From 87e4a6289c3cbb54d4c227b90640ae77aa7cebc1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 30 Sep 2023 09:50:28 -0700 Subject: docs: :memo: update embeddings docs page --- docs/docs/walkthroughs/codebase-embeddings.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/docs/walkthroughs/codebase-embeddings.md b/docs/docs/walkthroughs/codebase-embeddings.md index fc4d19cd..79c9edc1 100644 --- a/docs/docs/walkthroughs/codebase-embeddings.md +++ b/docs/docs/walkthroughs/codebase-embeddings.md @@ -9,6 +9,8 @@ While it is experimental, codebase embeddings will only be available through the 3. `python -m continuedev` to start the Continue server 4. Open `~/.continue/config.py` and add the following, filling in your OpenAI API key: +> NOTE: All of the `params` are optional. If you don't provide an OpenAI API key, sentence transformers embeddings will be calculated locally. And the values seen for the other parameters are the defaults so you can leave them out. After retrieving the top `n_retrieve` results from the vector database, an additional re-reranking step uses 2 LLM calls to select the top `n_final` results to use to answer the question. If you want to increase the speed of the query at the cost of relevancy, you can skip the re-ranking step by setting `use_reranking` to `False`. Then the top `n_final` results will just be directly calculated from the vector database. + ```python from continuedev.plugins.steps.chroma import ( AnswerQuestionChroma, @@ -30,7 +32,9 @@ config=ContinueConfig( description="Answer question after embeddings-based retrieval", step=AnswerQuestionChroma, params={ - "openai_api_key": "" + "n_retrieve": 20, + "n_final": 10, + "use_reranking": True }, ), ] -- cgit v1.2.3-70-g09d2