efugier / smartcat

Putting a brain behind `cat`🐈‍⬛ Integrating language models in the Unix commands ecosystem through text streams.

Home Page:https://crates.io/crates/smartcat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about `TODO`s

darinkishore opened this issue · comments

commented

Hi!

I really like smartcat. Been using for a month now, you replied to me (I think) on a helix discussion thread.

I wanted to hear more about the last two TODOs:

  • automagical context fetches
  • add RAG capabilities

Could you tell me what the "automagical context fetches" might look like? I also don't really understand what that means--what context would be fetched? what would be helpful?

Second, for RAG, could you tell me what you see the end user API looking like? Something like sc index . -e ".lock,.toml" and then sc query "can you give me the screenshot with the cat in it"?

I really like smartcat. Been using for a month now

Hey, that makes me really happy thanks a lot 😁

automagical context fetches
add RAG capabilities

To me they kind of both are two faces of the same coin.
For both of these items I'm not sure they would actually fall into smartcat's scope BUT, it sounds cool so I keep thinking about it.

The way I see things in terms of UX it would be defined as "strategies" to get the answer e.g.

sc "say something fun about the project doc" -s autocontext
# or
sc "say something fun about the project doc" --autocontext

Then you have several implementations available:

  1. RAG on the codebase (put local file pieces in a vector database then look for relevant pieces)
  2. Agent-based workflow where you give the llm the prompt and it can decide of taking a number of actions e.g.:
  • Get a list of local files
  • Get the content of a specific file
  • ask a language server for a code bit based on the query
  • ...

For now, I'm more leaning towards option 2 as it seems more fun to implement/use but also ultimately more powerful (but a bit more costly in terms of number of calls).

But I'm still unsure whether that would remain within the scope of the tool so no promises for now 🙂

Let me know if you have further questions or feedback!