Common Questions

Change Embedding Models Without Mixing Vectors

Plan an embedding-model change with a separate index, paired retrieval tests and rollback instead of mixing old document vectors with new queries.

·3 min read

The essentials

  • Usually, changing the embedding model means generating document embeddings again with the new model.
  • Query and document vectors need a compatible representation.
On this page

Usually, changing the embedding model means generating document embeddings again with the new model. Query and document vectors need a compatible representation. Matching dimensions alone does not prove compatibility between two separately trained models.

Treat the embedding setup as part of the index

Record model identity, revision, dimensions, normalization, prefixes, chunking rules and distance metric. These settings describe how the index was built.

Chroma's collection configuration documentation is one implementation reference for collection and embedding settings. Consult your actual database's migration rules before changing an existing collection.

The practical problem is not only whether a database accepts the new vector. It is whether distances still retrieve the right evidence.

Create a separate candidate index

Keep the existing index available. Reprocess the same permitted source documents into a new collection using the candidate configuration. Preserve stable document IDs and access-control metadata. For a concrete database implementation, consult Qdrant's embedding migration guide; the commands and migration options are specific to that system.

Do not silently combine old and new vectors in one collection unless the system explicitly supports the intended representation strategy. A successful insert is not a retrieval-quality test.

Track indexing failures and count source documents, produced chunks and inaccessible documents separately. A lower chunk count may reflect changed segmentation or missing data; inspect it before switching traffic.

Compare retrieval before answers

Prepare questions with known relevant passages. Include exact identifiers, paraphrases, missing answers and questions requiring more than one passage.

Case Expected passage Old index rank New index rank Missing evidence?
Exact identifier Record Record Record Record
Paraphrase Record Record Record Record
Absent fact None Record Record Record

Run both indexes with the same question set. Then compare generated answers using the retrieved contexts. This separates a retrieval improvement from a change in the generation model.

Switch with a rollback path

If the candidate meets your acceptance criteria, update the query embedding configuration and active collection together. Keep an explicit version mapping so a request cannot use a new query model against the old document index accidentally.

Retain the previous configuration for a defined rollback period, subject to your storage and retention requirements. Document what happens to new uploads during migration; otherwise the two indexes can drift.

Recheck permissions and freshness

A migration that retrieves better answers but loses document-level restrictions is a failure. Test with at least two roles and verify that removed or superseded sources remain excluded.

Use RAG explained for the architecture and regression testing for the acceptance cases. The migration is complete when retrieval, answers and access controls all behave as intended.

This guide draws on the linked documentation. Examples are illustrative unless explicitly identified as measured results.

L

Practical guides published by Lucivo, developed with AI assistance and references to official documentation. Examples are illustrative unless a guide explicitly documents a hands-on test. Check the linked sources for current product details.

Related articles

The Weekly Breakdown

High signal AI & software stories.
Direct to your inbox. No hype.

Independent analysis of AI models, developer tools, and computing architectures. Delivered every Sunday morning. 100% free.

Zero spam·One-click unsubscribe·Sunday delivery