A marketplace uses embeddings for product similarity. The embedding model is upgraded. What is the operational consequence, and how should the system be designed for it?
Show the full answer Hide the answer
The operational consequence
Every embedding must be regenerated, and vectors from different model versions are not comparable. A similarity search mixing old and new vectors returns meaningless results — the spaces are unrelated.
For a large catalogue this means: re-embedding the entire corpus (compute cost and time), rebuilding the index, and a cutover during which both versions must coexist without being mixed.
Embedding model upgrades are full data migrations, and treating them as configuration changes is how platforms produce a day of silently degraded search.
How to design for it
1. Version the embedding space explicitly. Every vector carries its model version, and queries specify which space they search. Mixing is then impossible by construction rather than by discipline.
2. Support two spaces simultaneously. Storage and index capacity for both during migration, with reads served from the old while the new is built.
3. Backfill incrementally and idempotently, rate-limited so it does not starve live traffic, and resumable because it will be interrupted.
4. Cut over with evaluation, not on completion. The new model must be better on a held-out set of real queries with known-good results. "Newer" is not "better" for a specific corpus, and this is the check most often skipped.
5. Keep the source text and the derivation pipeline, so re-embedding is repeatable. A vector whose source cannot be re-derived is unmaintainable.
6. Plan for it recurring. Model changes, chunking changes and preprocessing changes all invalidate embeddings. This is a routine operation and deserves tooling rather than a one-off project.
The subtler consequences
Downstream artefacts derived from embeddings — clusters, precomputed neighbour lists, cached recommendations — are also invalidated and must be regenerated in the correct order.
Evaluation sets must be maintained, or there is no way to establish that the new model is better for this corpus. Without one, the upgrade decision is aesthetic.
A/B comparison on real traffic is the honest final check, since offline evaluation of retrieval quality correlates imperfectly with user outcomes.
The general principle
Embeddings are derived data with a version, not a stable property of an item. Systems that treat them as permanent attributes discover the migration problem the first time the model changes, usually without the tooling to do it safely.