Repository navigation
Conversation
…embeddings Add voyage-code-4, voyage-context-4, voyage-3-large and voyage-code-3, with Matryoshka output dimensions and per-model request token limits. Send contextualized documents as a flat list with auto-chunking, and fail when an input is split into several chunks. Rebrand the user-visible name, document rerank-3 and rerank-3-lite, and fix the multimodal docs example image URL.
Owner
Author
|
Summary: new models and Matryoshka dimensions, per-model token batching, flat auto-chunked contextualized documents (multi-chunk results fail explicitly), rebrand to "Voyage AI by MongoDB", docs fixes. Proof: non-slow Python tests for embeddings and rerankers pass (218 passed); live Voyage runs for all new models, dimensions, contextualized document and query paths, rerank-3 / rerank-3-lite / rerank-2.5 with top_n, and a token-split batch with order preserved. The multimodal docs example now runs live. Review: two rounds, last verdict APPROVE. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Voyage AI by MongoDB embedding function was missing current models, sent contextualized documents the way the API no longer expects, and only knew a few reranker names in its docs.
This brings it up to date:
voyage-code-4,voyage-context-4,voyage-3-large,voyage-code-3, with native dimensions and Matryoshkaoutput_dimension(256/512/1024/2048) for the models that support it.output_dimensionis sent only when set, and aValueErroris raised for models that do not support it instead of ignoring it.voyage-code-4has no documented token limit, so it is split by input count only. A model without an entry raises instead of falling back to a default.voyage-context-*documents are sent as a flatlist[str]withenable_auto_chunking=Trueandchunk_size=32000, so each input is its own document. Queries are still sent without auto-chunking, which the API rejects for queries. If the API splits an input into several chunks, a non-retriedValueErroris raised instead of silently keeping only the first chunk.voyageairegistry key,VOYAGE_API_KEY, model ids and URLs are unchanged.rerank-3andrerank-3-liteand the minimumvoyageaiversion (0.4.0, which added auto-chunking). The multimodal docs example used a Wikimedia thumbnail URL that Voyage cannot fetch; it now uses an image from this repository.voyage-4-nanois not added: it runs locally and needs a different dependency and dimension contract.Testing
output_dimensionhandling, the contextualized document and query requests, the multi-chunk failure (including that it is not retried), and the batching boundaries (token limit per model, 1000-input cap, no-limit model, order, unknown model).table.addand search, contextualized documents and queries,rerank-3,rerank-3-liteandrerank-2.5withtop_n, and a batch of three 45K-token texts split into two requests with the order preserved.