Embedding Model Versioning and Reindexing Strategies for RAG Systems
Quick answer
In a RAG system, vectors created by different embedding models cannot be compared with each other, so changing the model means reindexing your data. The safest...
In a RAG system, vectors created by different embedding models cannot be compared with each other, so changing the model means reindexing your data. The safest approach is to version every vector by model, build the new index alongside the old one, evaluate it on real queries, and switch traffic only when it performs better. Keep the old index until you are confident you do not need to roll back.
Why Can You Not Mix Embeddings From Different Models?
An embedding model maps text to points in a vector space it defines. Different models, and often different versions of the same model, produce spaces that are not aligned, and they may have different dimensions altogether. Comparing a query vector from one model with document vectors from another gives meaningless similarity scores.
Even when two models produce vectors of the same size, the geometry differs. Changing the model for queries but not for documents, or the reverse, silently degrades retrieval quality without raising any error, which makes the problem hard to notice. Results still come back. They are simply worse.
The same caution applies to changes in preprocessing. If you alter how text is chunked, cleaned, or prefixed before embedding, the resulting vectors change too, so treat those changes as versions of the pipeline, not only of the model.
How Should You Track Versions?
Record enough metadata to know exactly how each vector was produced. Store this alongside the vector, or at the collection level, so you can always tell which vectors belong together.
- The embedding model name and version identifier, as provided by the vendor or your own registry.
- The vector dimension and the distance metric used for search.
- The chunking strategy and its parameters, such as chunk size and overlap.
- The preprocessing steps and any instruction prefixes added to queries or documents.
- The creation timestamp and the source document version, for traceability.
Use a separate collection or index per embedding version. Mixing versions in one collection with a filter is possible but error-prone, because a missing filter returns incomparable vectors together.
What Is a Safe Reindexing Strategy?
A blue-green approach avoids downtime. Keep serving queries from the current index while a background job re-embeds all documents into a new index. Once the new index is complete, run evaluation, then switch traffic through a configuration flag or an alias.
- Build in parallel: re-embed in batches, with rate limits and retries, and make the job resumable.
- Handle changes during the build: record updates and deletions that occur while reindexing, and apply them to both indexes or replay them afterward.
- Evaluate before switching: use a fixed set of representative queries with known good results, and compare metrics such as recall at a chosen cutoff and answer quality.
- Roll out gradually: send a small share of queries to the new index first, then increase it.
- Keep a rollback path: retain the old index for a defined period after the switch.
Plan for cost. Re-embedding a large corpus consumes API usage or compute, and storing two indexes temporarily doubles storage, so estimate both before starting.
How Do You Decide Whether to Change the Model at All?
Do not reindex just because a new model exists. Changing models is costly and carries risk. Justify it with evidence from your own evaluation set that shows better retrieval for your data and queries. Benchmarks on public datasets may not reflect your domain.
Also check the provider's deprecation policy. If your hosted model will be retired, schedule the migration early and avoid a rushed cutover. Pinning an explicit model version, where available, protects you from silent changes. Review current documentation for retention and deprecation timelines.
Frequently Asked Questions
Can I update only part of an index with a new model?
Not safely in the same searchable space. Partial updates create mixed vectors. Build a complete new index for the new model.
Do I need to re-embed queries as well?
Yes. Queries must use the same model and preprocessing as the documents they are compared against.
How often should I reindex?
Only when the model, chunking, or preprocessing changes, or when evaluation shows a worthwhile improvement.
How do I test a new embedding model before switching?
Build a candidate index, run a fixed evaluation set against both indexes, and compare retrieval metrics and final answer quality.
Summary
Version embeddings by model and pipeline, keep separate indexes, reindex in parallel with evaluation, and roll out gradually with a rollback path. Change models only when evidence justifies the cost, and consult your provider's documentation for deprecation schedules.