Skip to content

Commit dd3b543

Browse files
committed
docs: add reranking provider
1 parent d3a72c1 commit dd3b543

File tree

3 files changed

+87
-84
lines changed

3 files changed

+87
-84
lines changed

docs/docs/features/codebase-embeddings.md

-84
Original file line numberDiff line numberDiff line change
@@ -91,90 +91,6 @@ export function modifyConfig(config: Config): Config {
9191
}
9292
```
9393

94-
## Reranking providers
95-
96-
The reranker plays a crucial role in refining the results retrieved from your codebase. It processes the initial set of results obtained through embeddings-based retrieval, improving their relevance and accuracy for your queries.
97-
98-
Continue offers several reranking options: `cohere`, `voyage`, `llm`, `hugginface-tei`, and `free-trial`, which can be configured in `config.json`.
99-
100-
### Voyage AI
101-
102-
Voyage AI offers the best reranking model for code with their rerank-lite-1 model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
103-
104-
```json title="~/.continue/config.json"
105-
{
106-
"reranker": {
107-
"name": "voyage",
108-
"params": {
109-
"model": "rerank-lite-1",
110-
"apiKey": "<VOYAGE_API_KEY>"
111-
}
112-
}
113-
}
114-
```
115-
116-
### Cohere
117-
118-
See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
119-
120-
```json title="~/.continue/config.json"
121-
{
122-
"reranker": {
123-
"name": "cohere",
124-
"params": {
125-
"model": "rerank-english-v3.0",
126-
"apiKey": "<COHERE_API_KEY>"
127-
}
128-
}
129-
}
130-
```
131-
132-
### LLM
133-
134-
If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made.
135-
136-
```json title="~/.continue/config.json"
137-
{
138-
"reranker": {
139-
"name": "llm",
140-
"params": {
141-
"modelTitle": "My Model Title"
142-
}
143-
}
144-
}
145-
```
146-
147-
The `"modelTitle"` field must match one of the models in your "models" array in config.json.
148-
149-
### Text Embeddings Inference
150-
151-
[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows:
152-
153-
```json title="~/.continue/config.json"
154-
{
155-
"reranker": {
156-
"name": "huggingface-tei",
157-
"params": {
158-
"apiBase": "http://localhost:8080",
159-
"truncate": true,
160-
"truncation_direction": "Right"
161-
}
162-
},
163-
}
164-
```
165-
166-
### Free Trial (Voyage AI)
167-
168-
Continue offers a free trial of Voyage AI's reranking model.
169-
170-
```json title="~/.continue/config.json"
171-
{
172-
"reranker": {
173-
"name": "free-trial"
174-
}
175-
}
176-
```
177-
17894
## Ignore files during indexing
17995

18096
Continue respects `.gitignore` files in order to determine which files should not be indexed. If you'd like to exclude additional files, you can add them to a `.continueignore` file, which follows the exact same rules as `.gitignore`.
+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: Reranking Providers
3+
description: Overview of different reranking options available in Continue, including Cohere, Voyage AI, LLM, Hugging Face TEI, and free trial options.
4+
---
5+
6+
The reranker plays a crucial role in refining the results retrieved from your codebase. It processes the initial set of results obtained through embeddings-based retrieval, improving their relevance and accuracy for your queries.
7+
8+
Continue offers several reranking options: `cohere`, `voyage`, `llm`, `hugginface-tei`, and `free-trial`, which can be configured in `config.json`.
9+
10+
## Cohere
11+
12+
See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
13+
14+
```json title="~/.continue/config.json"
15+
{
16+
"reranker": {
17+
"name": "cohere",
18+
"params": {
19+
"model": "rerank-english-v3.0",
20+
"apiKey": "<COHERE_API_KEY>"
21+
}
22+
}
23+
}
24+
```
25+
26+
## Free Trial
27+
28+
Continue offers a free trial of Voyage AI's reranking model.
29+
30+
```json title="~/.continue/config.json"
31+
{
32+
"reranker": {
33+
"name": "free-trial"
34+
}
35+
}
36+
```
37+
38+
## LLM
39+
40+
If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made.
41+
42+
```json title="~/.continue/config.json"
43+
{
44+
"reranker": {
45+
"name": "llm",
46+
"params": {
47+
"modelTitle": "My Model Title"
48+
}
49+
}
50+
}
51+
```
52+
53+
The `"modelTitle"` field must match one of the models in your "models" array in config.json.
54+
55+
## Text Embeddings Inference
56+
57+
[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows:
58+
59+
```json title="~/.continue/config.json"
60+
{
61+
"reranker": {
62+
"name": "huggingface-tei",
63+
"params": {
64+
"apiBase": "http://localhost:8080",
65+
"truncate": true,
66+
"truncation_direction": "Right"
67+
}
68+
},
69+
}
70+
```
71+
72+
## Voyage AI
73+
74+
Voyage AI offers the best reranking model for code with their rerank-lite-1 model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
75+
76+
```json title="~/.continue/config.json"
77+
{
78+
"reranker": {
79+
"name": "voyage",
80+
"params": {
81+
"model": "rerank-lite-1",
82+
"apiKey": "<VOYAGE_API_KEY>"
83+
}
84+
}
85+
}
86+
```

docs/sidebars.js

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const sidebars = {
104104
],
105105
},
106106
"reference/embedding-providers",
107+
"reference/reranking-providers",
107108
],
108109
communitySidebar: [
109110
"community/community",

0 commit comments

Comments
 (0)