Voyage AI
App · 4 actions
Create text, multimodal and contextual embeddings and rerank search results with Voyage AI's retrieval models.
Actions
| Action | What it does |
|---|---|
| Create contextual embeddings | Embed the chunks of one document so that each chunk's vector also reflects the rest of the document. |
| Create embeddings | Turn each text into a vector with a Voyage AI embedding model, ready to store in a vector database such as Pinecone and search by meaning. |
| Create multimodal embedding | Turn a text, an image, or the two together into one vector, so pictures and words can be searched in the same index. |
| Rerank documents | Put a list of documents in order of how well each answers a query, with a score for each. |
Create contextual embeddings
Embed the chunks of one document so that each chunk's vector also reflects the rest of the document. Finds the right chunk more often than embedding the chunks one by one.
Inputs
- Document chunks
chunkslistRequired - The pieces of one document, in reading order, one entry each. Do not repeat text between pieces. With Input type set to Query, give a single entry.
- Input type
input_typetext - Optional. Use Document for text you will store and search through, and Query for the text a search starts from. Voyage AI adjusts the vector to match.One of:
document(Document (text you will store and search through)),query(Query (the question you search with)),none(Not set). Default:document. - Vector size
output_dimensiontext - Optional. How many numbers each vector holds. Smaller vectors are cheaper to store, larger ones slightly more exact. Leave empty for the model's own size (1,024) unless your vector database needs another. Only some models can change it.One of:
256,512,1024,2048.
Outputs
countnumber- How many vectors came back
dimensionnumber- How many numbers each vector holds
embeddingslist- One vector per text, in the order you sent them
modeltext- The model Voyage AI used
total_tokensnumber- Tokens Voyage AI counted for this request, which is what it bills
Example output
{
"count": 2,
"dimension": 4,
"embeddings": [
{
"embedding": [
0.0132,
-0.0267,
0.0418,
-0.0071
],
"index": 0
},
{
"embedding": [
0.0132,
-0.0267,
0.0418,
-0.0071
],
"index": 1
}
],
"model": "voyage-context-3",
"total_tokens": 24
}Create embeddings
Turn each text into a vector with a Voyage AI embedding model, ready to store in a vector database such as Pinecone and search by meaning. Takes up to 1,000 texts per step.
Inputs
- Texts
textslistRequired - The texts to embed, one entry each, for example the chunks of a document or the rows of a table.
- Model
modeltext - Optional. Voyage 4 suits most uses; Large is the most accurate, Lite the fastest and cheapest. Code, Finance and Law models do better on those subjects.One of:
voyage-4(Voyage 4 (default, balanced)),voyage-4-large(Voyage 4 Large (best quality)),voyage-4-lite(Voyage 4 Lite (fastest and cheapest)),voyage-code-4(Voyage Code 4 (source code)),voyage-finance-2(Voyage Finance 2 (finance)),voyage-law-2(Voyage Law 2 (legal)),voyage-3.5(Voyage 3.5),voyage-3.5-lite(Voyage 3.5 Lite),voyage-3-large(Voyage 3 Large),voyage-code-3(Voyage Code 3). Default:voyage-4. - Input type
input_typetext - Optional. Use Document for text you will store and search through, and Query for the text a search starts from. Voyage AI adjusts the vector to match.One of:
document(Document (text you will store and search through)),query(Query (the question you search with)),none(Not set). Default:document. - Vector size
output_dimensiontext - Optional. How many numbers each vector holds. Smaller vectors are cheaper to store, larger ones slightly more exact. Leave empty for the model's own size (1,024) unless your vector database needs another. Only some models can change it.One of:
256,512,1024,2048. - Shorten texts that are too long
truncationtrue/false - Optional. When on, a text longer than the model can read is cut to fit. When off, the step fails instead.Default:
true.
Outputs
countnumber- How many vectors came back
dimensionnumber- How many numbers each vector holds
embeddingslist- One vector per text, in the order you sent them
modeltext- The model Voyage AI used
total_tokensnumber- Tokens Voyage AI counted for this request, which is what it bills
Example output
{
"count": 2,
"dimension": 4,
"embeddings": [
{
"embedding": [
0.0132,
-0.0267,
0.0418,
-0.0071
],
"index": 0
},
{
"embedding": [
0.0132,
-0.0267,
0.0418,
-0.0071
],
"index": 1
}
],
"model": "voyage-4",
"total_tokens": 14
}Create multimodal embedding
Turn a text, an image, or the two together into one vector, so pictures and words can be searched in the same index.
Inputs
- Text
texttext - Optional. Words to embed. Give this, an image, or both.
- Image URL
image_urltext - Optional. The web address of a PNG, JPEG, WebP or GIF image, for example 'https://example.com/photo.jpg'. The address must be public.
- Model
modeltext - Optional. Voyage Multimodal 3.5 is the newest.One of:
voyage-multimodal-3.5(Voyage Multimodal 3.5 (default)),voyage-multimodal-3(Voyage Multimodal 3). Default:voyage-multimodal-3.5. - Input type
input_typetext - Optional. Use Document for text you will store and search through, and Query for the text a search starts from. Voyage AI adjusts the vector to match.One of:
document(Document (text you will store and search through)),query(Query (the question you search with)),none(Not set). Default:document.
Outputs
dimensionnumber- How many numbers the vector holds
embeddinglist- The vector: a list of numbers
image_pixelsnumber- Pixels counted for the image
modeltext- The model Voyage AI used
text_tokensnumber- Tokens counted for the text
total_tokensnumber- Tokens Voyage AI counted for this request, which is what it bills
Example output
{
"dimension": 4,
"embedding": [
0.0132,
-0.0267,
0.0418,
-0.0071
],
"image_pixels": 17920,
"model": "voyage-multimodal-3.5",
"text_tokens": 4,
"total_tokens": 36
}Rerank documents
Put a list of documents in order of how well each answers a query, with a score for each. Use it to pick the best matches out of search or database results.
Inputs
- Query
querytextRequired - The question or search to rank the documents against.
- Documents
documentslistRequired - The texts to put in order, one entry each. Up to 1,000.
- Model
modeltext - Optional. The Lite models are faster and cheaper; the others rank more accurately.One of:
rerank-2.5(Rerank 2.5 (default)),rerank-2.5-lite(Rerank 2.5 Lite (faster)),rerank-3(Rerank 3),rerank-3-lite(Rerank 3 Lite),rerank-2(Rerank 2),rerank-2-lite(Rerank 2 Lite). Default:rerank-2.5. - Best matches to return
top_knumber - Optional. Return only this many documents, best first. Leave empty to get them all.At least 1.
- Shorten texts that are too long
truncationtrue/false - Optional. When on, a text longer than the model can read is cut to fit. When off, the step fails instead.Default:
true.
Outputs
countnumber- How many documents came back
modeltext- The model Voyage AI used
resultslist- Documents from most to least relevant
top_documenttext- The most relevant document, for convenience
total_tokensnumber- Tokens Voyage AI counted for this request, which is what it bills
Example output
{
"count": 2,
"model": "rerank-2.5",
"results": [
{
"document": "Voyage AI makes embedding models for search.",
"index": 1,
"relevance_score": 0.8984375
},
{
"document": "The weather is mild in spring.",
"index": 0,
"relevance_score": 0.1171875
}
],
"top_document": "Voyage AI makes embedding models for search.",
"total_tokens": 31
}