← All insights
ENGINEERING JOURNAL / Software Engineering

Embedding upgrades: migrate the retrieval contract with the index

Plan an embedding-model migration using versioned corpus and query pipelines, retrieval evaluation and a reversible index switch rather than dimensions alone.

CLOUVENIX / AI RETRIEVAL ENGINEERINGA versioned query and corpus representation01 / DOCUMENTCORPUS V202 / MODELEMBED MODEL03 / STOREINDEX V204 / SEARCHQUERY V2Conceptual flow / compatible dimensions do not prove compatible meaning
A versioned query and corpus representation — conceptual flow, not a deployment topology
TOPICENGINEERING NOTES
01

The vector length is not the whole contract

An embedding represents content in a model's numerical space. Two models can produce vectors with the same length while placing concepts differently. Replacing the query model without considering the stored document representation can therefore change retrieval behavior even when the database accepts the vector.

This guide concerns planned retrieval migrations, not document-permission design. Authorization must remain enforced throughout the change. A new index should never become a shortcut that drops tenant filters or exposes documents to users who were excluded by the previous retrieval path.

02

Setup: version the complete representation

Record the embedding model and version, task type, dimensions, normalization, chunking rules, metadata and query preprocessing. Give the index and generation pipeline an explicit version. Retain source document identifiers and revision markers so the team can explain which representation exists in each index.

Google's embedding task-type documentation distinguishes retrieval-oriented query and document roles from other similarity tasks. Apply the model provider's actual pairing requirements rather than selecting settings by name alone. The vector-store update documentation describes index-update mechanisms; choosing a supported update operation does not by itself establish semantic compatibility or business acceptance.

03

Illustrative incident: the index accepts queries but relevance falls

An illustrative knowledge assistant changes its query embedding model while leaving the corpus vectors untouched. Requests return normally, but expected documents disappear from the top results. Infrastructure health remains green because the failure concerns retrieval meaning. This is a teaching example, not a reported model benchmark or client outcome.

Build a protected evaluation set of representative questions, expected sources and forbidden sources. Compare retrieval results before generation so fluent model output cannot hide missing evidence. Avoid putting confidential customer questions into an external evaluation service without an approved data-processing arrangement.

04

Troubleshooting: compare representation versions

ObservationEvidenceInvestigation
Requests succeed but expected sources disappearQuery and corpus model versionsAre their embedding spaces compatible?
Only some documents look wrongIngestion revision and chunk metadataIs the index mixing representation generations?
Results are relevant but unauthorizedTenant and document filtersDid the migration drop access controls?
New index appears incompleteSource inventory and ingestion outcomesWere all eligible revisions accepted?

Do not declare the migration successful from vector count alone. Counts can match while documents are duplicated, stale or represented with the wrong preprocessing contract.

05

Corrective action through a reversible path

Build the new representation in a separately identified index or supported isolated version. Re-embed the intended corpus using the reviewed pipeline, then use the matching query configuration. Shadow representative queries without changing user-visible answers until acceptance evidence is available.

Define how new or updated documents reach both versions during transition. Reconcile identifiers and revisions before promotion. Keep the prior index and query path available for rollback under a retention and access policy. Do not delete the old representation immediately merely because the new endpoint responds successfully.

06

Verification, quality SLO and SOP

Evaluate relevance, source coverage, permissions, latency and cost under representative workloads. Test a document update and deletion after the switch, including removal from any retained serving path. Confirm that rollback restores a coherent query-and-corpus pair.

An internal retrieval SLO can define eligible questions, expected evidence quality and freshness. A contractual SLA needs separate scope and cannot promise that every generated answer is correct. The SOP should identify model-change authority, corpus reconciliation, evaluation ownership, access checks and rollback criteria. Report observed evaluation results with their limits rather than inventing universal accuracy gains.

See AI and intelligent automation and cloud security.

Technical reference

Google embedding task types and vector index updates, reviewed 19 October 2026. Follow documentation matching the installed product version.