voyage-context-4
About this model
Contextualized chunk embeddings produce vectors for document chunks that capture the full surrounding document context, without any manual metadata augmentation — leading to higher retrieval accuracy than chunk embeddings with or without augmentation.
voyage-context-4 is the next generation of Voyage AI's contextualized chunk embedding model, delivering higher retrieval accuracy, more effective long-document support, and built-in auto-chunking, with full support for both overlapping and non-overlapping chunks. Users can submit a full document as a single string and let the backend chunk it automatically, with chunk text returned in the response for inspection and storage. voyage-context-4 delivers approximately 1.4% higher NDCG@10 chunk-retrieval quality than voyage-context-3 and approximately 8.4% higher than Cohere Embed v4.0 across chunk-level retrieval benchmarks, while removing the 32K-token ceiling that challenges most contextualized chunking models through extended context handling via backend partitioning. Learn more about voyage-context-4 here: https://blog.voyageai.com/2026/06/29/voyage-context-4/
Key model capabilities
- Built-in auto-chunking — submit a full document as a single string and the backend chunks it automatically, returning chunk text in the response, removing the need to hand-tune chunk sizes and preprocessing logic. Supports both overlapping and non-overlapping chunks.
- Improved retrieval quality with approximately 1.4% higher NDCG@10 chunk-retrieval performance than voyage-context-3 and approximately 8.4% higher than Cohere Embed v4.0 across chunk-retrieval benchmarks.
- Removes the 32K-token ceiling that challenges most contextualized chunking models, handling longer documents through backend partitioning.
- Enabled by Matryoshka representation learning and quantization-aware training, supports embeddings in 2048, 1024, 512, and 256 dimensions with multiple quantization options.
Usage
The deployed Azure AI Foundry endpoint exposes the Voyage inference API. Authenticate with your Azure ML endpoint key or a bearer token issued for the workspace.
Auto-Chunked Contextualized Embeddings
Submit each document as a single string and let the backend chunk it automatically:
curl <AZUREML_ENDPOINT_URL>/v1/contextualizedembeddings \
-X POST \
-H "Authorization: Bearer <AZUREML_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"inputs": [
"Vector search enables semantic similarity search using embeddings. It underpins modern retrieval-augmented generation (RAG) systems by finding the most relevant chunks of a document for a given query, rather than relying on exact keyword matches."
],
"input_type": "document",
"enable_auto_chunking": true,
"model": "voyage-context-4"
}'
Pre-Chunked Contextualized Embeddings
Pre-chunked input (manual chunking, no enable_auto_chunking) is also supported for parity with voyage-context-3 — pass each document as a list of pre-split chunk strings instead of a single string:
curl <AZUREML_ENDPOINT_URL>/v1/contextualizedembeddings \
-X POST \
-H "Authorization: Bearer <AZUREML_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"inputs": [
[
"Vector search enables semantic similarity search using embeddings.",
"It underpins modern retrieval-augmented generation (RAG) systems by finding the most relevant chunks of a document for a given query, rather than relying on exact keyword matches."
]
],
"input_type": "document",
"model": "voyage-context-4"
}'
The response has the same shape as the auto-chunked example, except chunker_version is null since no server-side chunking ran.
Supported Parameters
- inputs (array, required): A list of documents. With
enable_auto_chunking: true, pass each document as a plain string (flat list). Without it, pass each document as a list of pre-split chunk strings (nested list). - model (string, required):
voyage-context-4. - input_type (string, optional):
queryordocument. Required to bedocumentwhenenable_auto_chunkingistrue. - enable_auto_chunking (bool, optional): If
true, the server chunks each input document automatically. Defaults tofalse. - chunk_size (int, optional): Override the model's default auto-chunking chunk size, in content tokens.
- chunk_overlap (int, optional): Override the model's default auto-chunking chunk overlap, in content tokens. Must be less than
chunk_size. - output_dimension (int, optional):
256,512,1024, or2048. Defaults to1024. - output_dtype (string, optional):
float,int8,uint8,binary, orubinary. Defaults tofloat. - encoding_format (string, optional):
base64to return embeddings as base64-encoded strings instead of float arrays.
See the full API reference at https://docs.voyageai.com/reference/contextualized-embeddings-api .
Response
{
"object": "list",
"data": [
{
"object": "list",
"index": 0,
"data": [
{"object": "embedding", "index": 0, "embedding": [0.012, -0.034, "..."], "text": "Vector search enables semantic similarity search using embeddings."},
{"object": "embedding", "index": 1, "embedding": [0.041, 0.007, "..."], "text": "It underpins modern retrieval-augmented generation (RAG) systems..."}
]
}
],
"model": "voyage-context-4",
"usage": {"total_tokens": 48},
"chunker_version": "1"
}
The top-level data list has one entry per input document. Each document's data list contains one entry per chunk, with the chunk's embedding and (when auto-chunking ran) its text. chunker_version is populated when auto-chunking ran, and is null for pre-chunked inputs.