Skip to content

docs: providing pre-generated document embeddings for auto-embedding fields#491

Open
alangmartini wants to merge 1 commit into
typesense:masterfrom
alangmartini:docs/pre-generated-embeddings-auto-embed-fields
Open

docs: providing pre-generated document embeddings for auto-embedding fields#491
alangmartini wants to merge 1 commit into
typesense:masterfrom
alangmartini:docs/pre-generated-embeddings-auto-embed-fields

Conversation

@alangmartini

@alangmartini alangmartini commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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

  • New "Providing pre-generated document embeddings for auto-embedding fields" section at the end of Option B: how it works, when to use it, an import example, a warning that vectors must come from the same model with the model's indexing prefix applied (e.g. passage: for ts/e5-*), and a note that updating embed.from fields without the vector triggers regeneration.
  • A tip in the Hybrid Search section cross-referencing the new section as an alternative to manually embedding the query.

Only 30.2 is touched, per the convention of editing the latest version dir.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant