The interview problem
Design a safe rollout from one document embedding model to another while search remains available.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume equal vector dimension does not imply comparable coordinates. Build a new versioned index with new document embeddings and route queries to the matching encoder/index pair. Track backfill coverage and replay document updates into both versions during migration. Compare relevance and latency on shadow traffic, then canary complete query paths. Keep an old-version rollback window and account for deletions in both indexes.
2. Trace the design or derivation
Snapshot documents → backfill new vectors → replay updates → compare shadow queries → switch paired versions
A useful migration manifest records document version, embedding version and indexed watermark. Check the newest document version at publication to avoid a slow backfill overwriting a fresh dual-written embedding. Rollback requires the old index to have received changes during the canary period, including permission updates and deletions.
3. Calculate the example
A collection of 10 million documents with 768 float32 dimensions contains 30.72 GB of raw vectors per version. Dual raw vectors require 61.44 GB before graph, metadata, replicas and allocator overhead.
4. Failure cases and trade-offs
Using a new query encoder against old document vectors can silently destroy relevance. Missing updates during backfill produce stale results even when vector versions match. Dual writing simplifies rollback but doubles some costs and operational failure modes. Validate watermark and deletion parity before cutover.
5. Validation, follow-ups and self-review
Inject encoder/index version mismatches, update races and deletion during backfill. Follow-up: can you migrate by tenant independently? Self-review: make vector-space compatibility and freshness separate release gates.
Sources and related practice
Technical reference: github.com — Vector index representation and querying; dual-index migration is original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Migrate a customer workflow between model providers; Build and atomically switch a distributed search index.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.