Open nikhil-swamix opened 4 months ago
I have a similar need. I need to have a custom context provider that can supply RAG context for internal company graphQL schema questions. I would like to have a context provider that I can set to fire on every message, without needing to annotate (@providername). The custom provider could look at the message and decide whether to look for additional data if it seems necessary.
Having to use annotations is cumbersome for our users, and it would be preferred to allow the custom provider decided on the fly whether to be involved or not. I think this would allow for a lot of flexibility for other people to decide just how they want to provide context data.
I would love to see a config to set a provider as always enabled or something
To tackle default context, I'd recommend to have a look at the repository map feature from Aider. The gist is that an enhanced ctags style map of files in the repository gets generated using tree-sitter.
This repository map gets optimized and truncated to a token limit and sent with every request to the LLM, so it has a broad context about the whole project (without including whole files/code chunks), not just the current file/context.
I'd love to see a feature like this in Continue (it may even replace the whole embeddings/indexing/re-ranking mess or at least be a fast alternative with much, much less overhead).
One downside is, that not all languages are supported for generating such a repository map, see here. So the current embeddings/indexing/re-ranking should of course stay as a safe fallback, but please optional.
My $0.02
Here's a similar issue: https://github.com/continuedev/continue/issues/1881
Validations
Problem
Solution
provide a method to customize default context for queries, its tedious to type everytime , maybe add scope to run custom JS like postman does for pre-request and post-request, using this the user may customize what goes in and what comes out! without touching the config json again and again