docs: providing pre-generated document embeddings for auto-embedding fields#491
Open
alangmartini wants to merge 1 commit into
Open
Conversation
…fields Documents that already contain a value for an auto-embedding field are indexed with the provided vector and skip embedding generation, while Typesense still embeds the query at search time. Documents when to use this (bulk imports, GPU/model contention with concurrent hybrid search, cost) and the same-model + indexing-prefix requirements, with a cross-reference from the hybrid search section. Claude-Session: https://claude.ai/code/session_01Vvtp2Z3KRphwTNrepC6EuU
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
Adds a section to the 30.2 vector search docs covering a supported but previously undocumented pattern: generating document embeddings outside Typesense while keeping an auto-embedding field, so Typesense still generates the query embedding at search time and semantic/hybrid search works unchanged.
When a document already contains a value for its auto-embedding field, Typesense indexes the provided vector as-is and skips generation (see
Index::batch_embed_fields, which skips docs that already carry the field on create/upsert/update).Why
This is the pattern we recommend to customers doing large bulk imports alongside highly concurrent hybrid search: with built-in models, document embedding and query embedding share the same per-node model instance (and GPU), so import-time embedding can slow query embedding. Until now the docs only offered fully external embeddings with a manual
vector_query(embedding the query client-side), so there was nothing to link customers to for this middle path.Changes
passage:forts/e5-*), and a note that updatingembed.fromfields without the vector triggers regeneration.Only
30.2is touched, per the convention of editing the latest version dir.