Embeddings VoyageAI Contextualized
AI-generatedSummary
Supplies a VoyageAI contextualized embeddings model (voyage-context-3) to a connected vector store. It reads incoming items, groups chunks by document ID, and embeds each group in one API call so chunk embeddings reflect their surrounding document.
Inputs
- Document ID Field (required) — Name of the JSON field on each input item holding the document identifier (default 'documentId'). Chunks sharing a value are embedded together. A missing/null value throws an error.
- Text Field (required) — Name of the JSON field holding the chunk text (default 'text'). Empty or missing text throws an error.
- Options > Input Type — None (default), Query, or Document. Hints the API to optimize embeddings for search queries or for documents to be searched. When none is set, query embeddings default to 'query'.
- Options > Output Dimension — Embedding size: Default (1024), 256, 512, 1024, or 2048. Default means the parameter is not sent.
- Options > Output Data Type — float (default), int8, uint8, binary, or ubinary. Quantized types reduce storage and improve latency.
Output shape
An AI Embedding connection (not regular item data) exposing a LangChain Embeddings object, to be wired into a vector store node's embedding input.
Embeddings for all input items are precomputed when the node supplies data, via the VoyageAI contextualized embed endpoint. Limits: at most 1,000 document groups and 16,000 chunks per run, otherwise an error is thrown. When the vector store embeds documents, vectors are looked up by matching chunk text, so identical text appearing in several chunks maps to the first occurrence's embedding. Query embedding at search time uses the standard (non-contextualized) VoyageAI embed endpoint with the same model. Uses the voyageAiApi credential; the base URL comes from the credential, falling back to https://api.voyageai.com/v1. The model is fixed at voyage-context-3. API errors are wrapped as node errors.
Examples
Example 1: Index chunked documents into a vector store with context-aware embeddings
Feed chunk items with documentId and text fields into this node, connect its Embeddings output to a vector store in insert mode. Set Input Type to Document and keep default field names.
Example 2: Reduce vector storage cost
Set Options > Output Dimension to 512 and Output Data Type to int8. Use the same settings when querying the store.