zero gravitySOLUTIONS
← All insightsAI & AUTOMATION / MIGRATION GUIDE

Migrate embedding models without mixing vector spaces

QUICK ANSWER

An embedding migration should create a separate representation for the new model and route queries with the matching encoder and index configuration. Backfill from versioned sources, apply ongoing changes to both generations, evaluate relevance independently, and switch the serving configuration only after coverage and lifecycle checks pass.

Inside this article 5 sections

Two embedding models can produce vectors with the same number of dimensions and still represent meaning in incompatible spaces. Replacing the query encoder while keeping old document vectors can therefore break retrieval without triggering a schema error.

Treat an embedding change as a data-representation migration. The serving unit includes the document encoder, query encoder, vector dimensions, distance metric, index configuration, and relevant preprocessing. A successful migration keeps those pieces aligned while source documents continue to change.

Give each representation an explicit generation

Create a representation identifier that records the model and preprocessing configuration. Include chunking version when it changes, because different boundaries alter the indexed content as well as the vectors. Store source ID and source revision with each derived record.

Use a separate index, table, partition, or vector field arrangement that prevents accidental comparison between generations. The exact storage design depends on the platform, but the application should never infer compatibility solely from vector length.

Keep the query encoder and index target in one immutable serving configuration. If a deployment changes one environment variable before another, requests can briefly use a mismatched pair. Resolve the complete configuration at request start and retain it for the retrieval operation.

Backfill while preserving ongoing changes

EMBEDDING MIGRATION / TWO REPRESENTATIONS, ONE SOURCE LIFECYCLE
Authoritative sourcesIDs and revisions→Current generationServing index A↔Candidate generationBackfill index B
EDITS AND DELETIONS REACH BOTH GENERATIONS; THE SERVING POINTER SELECTS A MATCHED QUERY ENCODER AND INDEX
The diagram represents lifecycle obligations, not an instruction to copy vectors between spaces. Each generation embeds the appropriate source content with its own configuration.

Choose a source snapshot or checkpoint for the backfill, then capture subsequent edits and deletions. The candidate must converge to current source state before cutover. A completed batch count alone does not prove convergence if updates arrived while the backfill was running.

Make writes generation-aware. A slow backfill job for source revision four must not overwrite revision five already processed by the change stream. Use conditional publication or a current-source revision check, and keep stale results out of the candidate's serving set.

Apply deletions to both generations. If a document is removed during backfill, a late embedding result must not resurrect it. Preserve deletion state long enough to fence delayed jobs and to protect any future restoration of the old index.

Audit coverage and failures before judging relevance

Track expected sources, successfully represented revisions, quarantined failures, and deleted records by collection and tenant. Compare identities and versions, not just total vector counts. Two indexes can contain the same number of records while one is missing an important collection and duplicating another.

Separate embedding failures from parsing and source-access failures. A new model's input limit may expose oversized chunks; a connector issue may make documents unavailable; a rate limit may delay processing. The remediation differs, and none should silently count as successful migration.

Keep the backfill idempotent and resumable. Persist checkpoints and operation identities so a worker restart does not require starting from the beginning or creating duplicate vectors. Budget the migration workload so it does not exhaust the capacity needed by the currently serving system.

Compare outcomes, not raw similarity scores

Run the same versioned question set against both complete configurations. Include exact identifiers, paraphrases, rare terms, permission boundaries, and questions requiring several passages. Judge whether the retrieved context contains the necessary applicable evidence.

Do not compare cosine or distance scores numerically across models as if they shared one calibrated scale. A threshold that worked for generation A may reject useful results or admit weak results in generation B. Recalibrate any threshold using the candidate's own reviewed outcomes.

If hybrid search or reranking is involved, isolate the change where practical. First compare the embedding replacement with other settings held steady; then evaluate any additional tuning as a separate configuration. Otherwise an improvement may come from a changed context budget rather than the model.

Inspect regressions by source type and language. An average gain can hide worse retrieval for a small but important policy collection. Include downstream answer evaluation, but require the expected evidence so the generator's general knowledge does not conceal missing retrieval.

Switch a serving pointer and rehearse rollback

Cut over by selecting the candidate's full serving configuration after coverage and relevance gates pass. Canary a defined request subset if the application supports it, and tag every trace with the representation generation. Keep the old generation current for the agreed rollback window.

Run a migration drill that edits one source, deletes another, and delays a backfill worker. Switch to the candidate, ask questions that touch each source, then return to the old generation. Both directions should honor the latest source lifecycle state and current permissions.

Rollback becomes unsafe if the old index has stopped receiving changes or references a retired encoder. Define the retention and maintenance window explicitly. When retiring generation A, remove its serving eligibility before deleting artifacts and document what recovery remains possible.

Track retrieval failures, empty-result rates, latency, and source-version mismatches after cutover. A successful deployment event does not prove every query path uses the new configuration; citation lookup and parent expansion may still point to old records.

The deletion guide covers lifecycle fencing, and hybrid retrieval experiments cover relevance comparison. Our AI integration services can connect those controls into an embedding migration plan.

FROM INSIGHT TO ACTIONAI-native implementation

Move retrieval to a new representation with clear evidence.

We help design embedding backfills, dual-generation serving, and rollback checks around your source lifecycle and real retrieval questions.

Explore AI implementationDiscuss your AI workflow

Start with your goals.
We’ll work through the next step together.