You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0ac5d91
Browse filesBrowse the repository at this point in the historyBrowse files
feat(embeddings): add Voyage AI embedding models, contextualized embeddings and rerank
Adds a voyage provider to the embedding catalog (voyage-4-large, voyage-4,
voyage-4-lite, voyage-code-4, voyage-finance-2, voyage-law-2 and the
voyage-3.x generation) with an adapter for /v1/embeddings, the
embeddings_voyage tool, BYOK key support, VOYAGE_API_KEY for hosted use and
per-model pricing.
Adds a Voyage AI block with contextualized embeddings (list of chunk lists
per document) and rerank tools, with hosted-key billing and a string
detail error extractor.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/integrations/embeddings.mdx
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Knowledge bases embed separately. Each base fixes an embedding model and vector
35
35
36
36
## Use the block [#usage-instructions]
37
37
38
-
Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, OpenRouter, Google Gemini, Cohere, and Mistral embedding models, plus embedding models on a self-hosted Ollama.
38
+
Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, OpenRouter, Google Gemini, Cohere, Mistral, and Voyage AI embedding models, plus embedding models on a self-hosted Ollama.
39
39
40
40
## Actions
41
41
@@ -189,6 +189,36 @@ Generate embeddings from text using Mistral's embedding models
189
189
190
190
</ReferenceDetails>
191
191
192
+
### Voyage AI Embeddings
193
+
194
+
Generate embeddings from text using Voyage AI's embedding models
195
+
196
+
<ReferenceDetails>
197
+
198
+
#### Input
199
+
200
+
| Parameter | Type | Required | Description |
201
+
| --------- | ---- | -------- | ----------- |
202
+
|`input`| string | Yes | Text to embed, or an array of texts to embed in one call |
203
+
|`model`| string | Yes | Embedding model to use |
204
+
|`taskType`| string | No | What the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering |
205
+
|`dimensions`| number | No | Output dimensions, when the model supports truncation. Defaults to native. |
206
+
|`apiKey`| string | Yes | API key for the selected embedding provider |
207
+
208
+
#### Output
209
+
210
+
| Parameter | Type | Description |
211
+
| --------- | ---- | ----------- |
212
+
|`embeddings`| json | Generated embedding vectors, one per input, in input order |
213
+
|`model`| string | Model used |
214
+
|`provider`| string | Provider used |
215
+
|`dimensions`| number | Dimensionality of each returned vector |
216
+
|`usage`| json | Token usage |
217
+
| ↳ `prompt_tokens`| number | Tokens in the input |
218
+
| ↳ `total_tokens`| number | Total tokens billed |
219
+
220
+
</ReferenceDetails>
221
+
192
222
### Ollama Embeddings
193
223
194
224
Generate embeddings on a self-hosted Ollama server
[Voyage AI](https://www.voyageai.com/) provides embedding and reranking models for search and retrieval.
14
+
15
+
With the Voyage AI block, you can:
16
+
17
+
-**Embed documents with context**: Send the full text of each document. Voyage splits it into chunks, and every chunk vector reflects the whole document around it, so retrieval finds the right passage even when the chunk alone is ambiguous. Search queries are embedded with the same model and Input Type set to Query.
18
+
-**Rerank results**: Reorder retrieved texts by relevance to a query, so your agent reads the best matches first.
19
+
20
+
Create an API key in the [Voyage AI dashboard](https://dash.voyageai.com/) and paste it into the block, or store it once as a workspace key under Settings > BYOK.
21
+
22
+
In Sim, the Voyage AI block lets your agents index documents for search and tighten the results they retrieve before answering.
23
+
{/* MANUAL-CONTENT-END */}
24
+
25
+
## Use the block [#usage-instructions]
26
+
27
+
Embed documents with Voyage AI contextualized models, so each chunk vector reflects the whole document around it, and rerank texts against a query with Voyage AI rerankers.
28
+
29
+
## Actions
30
+
31
+
### Voyage AI Contextualized Embeddings
32
+
33
+
Embed documents with a contextualized model: Voyage splits each document into chunks, and every chunk vector also reflects the whole document it came from
34
+
35
+
<ReferenceDetails>
36
+
37
+
#### Input
38
+
39
+
| Parameter | Type | Required | Description |
40
+
| --------- | ---- | -------- | ----------- |
41
+
|`input`| array | Yes | Texts to embed, as a list of strings. For document: the full text of each document, which Voyage chunks itself. For query: one search query per entry. |
Copy file name to clipboardExpand all lines: apps/sim/.env.example
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,7 @@ CRON_SECRET=your_cron_secret # Use `openssl rand -hex 32` to generate. Authentic
115
115
# NEXT_PUBLIC_AZURE_CONFIGURED=true # Set when Azure credentials are pre-configured above. Hides endpoint/key/version fields in Agent block UI.
116
116
# COHERE_API_KEY= # Cohere API key for the Knowledge block reranker (rerank-v4.0-pro/-fast, rerank-v3.5). Alternatively set COHERE_API_KEY_1/2/3 for rotation.
117
117
# NEXT_PUBLIC_COHERE_CONFIGURED=true # Set when COHERE_API_KEY (or rotation keys) are pre-configured above. Hides the Cohere API Key field on the Knowledge block UI.
118
+
# VOYAGE_API_KEY= # Voyage AI API key for the Embeddings block (voyage-4-large, voyage-4, voyage-4-lite, voyage-code-4, ...) and the Voyage AI block (contextualized embeddings, rerank).
118
119
119
120
# Hosted tool API keys (Optional - lets Sim supply the key so users don't have to bring their own).
120
121
# Each provider reads `{PREFIX}_COUNT` then `{PREFIX}_1..N`, distributing requests round-robin across the keys.
'Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, OpenRouter, Google Gemini, Cohere, and Mistral embedding models, plus embedding models on a self-hosted Ollama.',
190
+
'Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, OpenRouter, Google Gemini, Cohere, Mistral, and Voyage AI embedding models, plus embedding models on a self-hosted Ollama.',
0 commit comments