summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-10-11 19:28:51 -0700
committerNate Sesti <sestinj@gmail.com>2023-10-11 19:28:51 -0700
commitb281b56395f58410e05692de2e15e742840d2434 (patch)
tree7b9123820b09443cd28b028bb465414dc4801274
parente39b5f552f51a53f1771408440ebb867cc2c556e (diff)
downloadsncontinue-b281b56395f58410e05692de2e15e742840d2434.tar.gz
sncontinue-b281b56395f58410e05692de2e15e742840d2434.tar.bz2
sncontinue-b281b56395f58410e05692de2e15e742840d2434.zip
docs: :memo: update embeddings docs
-rw-r--r--.gitignore2
-rw-r--r--docs/docs/walkthroughs/codebase-embeddings.md21
2 files changed, 10 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 0356fce5..34d920af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -138,3 +138,5 @@ codeql
**/.continue
.DS_Store
.continue
+.test
+.tiktoken_cache \ No newline at end of file
diff --git a/docs/docs/walkthroughs/codebase-embeddings.md b/docs/docs/walkthroughs/codebase-embeddings.md
index 66e7bc1b..49d82ff5 100644
--- a/docs/docs/walkthroughs/codebase-embeddings.md
+++ b/docs/docs/walkthroughs/codebase-embeddings.md
@@ -2,14 +2,12 @@
We're sharing an early look at an experimental plugin: codebase embeddings. By using the /codebase slash command, you will be able to ask a question and Continue will use similarity search to find the most relevant files to answer the question.
-While it is experimental, codebase embeddings will only be available through the PyPI package. Here are the steps to get started:
+While it is experimental, codebase embeddings will only be available through the VS Code pre-release. Here are the steps to get started:
-1. In VS Code settings (cmd+,), search for "continue" and check the box that says "Manually Running Server"
-2. `pip install --upgrade continuedev` to install the Continue PyPI package
-3. `python -m continuedev` to start the Continue server
-4. Open `~/.continue/config.py` and add the following, filling in your OpenAI API key:
+1. In the VS Code extension settings, select Continue and click the "Switch to Pre-release Version" button
+2. Unless you are downloading Continue for the first time, 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 in this example for the other parameters are the defaults so you can leave them out.
+> NOTE: All of the `params` are optional. If you don't provide an OpenAI API key, sentence transformers embeddings will be calculated locally with `all-MiniLM-L6-v2`. The values seen in this example for the other parameters are the defaults so you can leave them out.
```python
from continuedev.plugins.steps.chroma import (
@@ -34,20 +32,17 @@ config=ContinueConfig(
params={
"n_retrieve": 20,
"n_final": 10,
- "use_reranking": True,
- "sentence_transformers_model": "openai"
+ "use_reranking": True
},
),
]
)
```
-5. Reload the VS Code window to connect to the server you are running manually and allow the config changes to take effect
-6. When you open a workspace, Continue will generate the embeddings. You can then enter '/codebase \<QUESTION\>' to ask a question with embeddings-based retrieval.
-7. Please share feedback in [Discord](https://discord.gg/NWtdYexhMs)!
+3. Reload the VS Code window to allow config changes to take effect, and for the indexing step to run
+4. When you open a workspace, Continue will generate the embeddings. You can then enter '/codebase \<QUESTION\>' to ask a question with embeddings-based retrieval.
+5. Please share feedback in [Discord](https://discord.gg/NWtdYexhMs)!
## Parameters
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.
-
-The `sentence_transformers_model` parameter allows you to select a custom embeddings model from the list [here](https://www.sbert.net/docs/pretrained_models.html). The default value is "openai", but if you don't include your OpenAI API key, it will fall back to using the `all-MiniLM-L6-v2` sentence transformers model.