Skip to main content

Codebase Retrieval

Continue indexes your codebase so that when you input a message using Command+Enter, it can automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally with all-MiniLM-L6-v2 and stored locally in ~/.continue/embeddings.

The codebase retrieval feature allows the following customization options by editing config.json as follows:

"retrieval_settings": {
"n_retrieve": 100,


Number of results to initially retrieve from vector database (default: 50)


Final number of results to use after re-ranking (default: 10)


Whether to use re-ranking, which will allow initial selection of n_retrieve results, then will use an LLM to select the top n_final results (default: True)


Number of results to group together when re-ranking. Each group will be processed in parallel. (default: 5)


Files to ignore when indexing the codebase. You can use glob patterns, such as **/*.py. This is useful for directories that contain generated code, or other directories that are not relevant to the codebase. (default: [])


OpenAI API key. If set, Continue will calculate embeddings by calling OpenAI's ada-002 embeddings API. (default: None)

Azure OpenAI

These settings allow you to connect to an Azure-hosted OpenAI API. All must be filled out in order to use Azure OpenAI for embeddings, as well as the openai_api_key.


OpenAI API base URL (default: None)


OpenAI API type (default: None)


OpenAI API version (default: None)


OpenAI organization ID (default: None)