Vector Search easy
Your team wants to switch to a newer, higher-quality embedding model. The existing index holds 50 million vectors produced by the old model. What is the safe approach?
- A Build a new versioned index with the new model, dual-write during migration, then cut over.
- B Update the model name in the config so new queries use the new model against the existing index.
- C Embed only new documents with the new model and let the old vectors age out of the index naturally.
- D Keep the old index and normalize the query vectors so that both models produce comparable scores.
Answer: A. Build a new versioned index with the new model, dual-write during migration, then cut over.
Different models produce **incompatible vector spaces**, so changing the model means a full reindex, which costs compute and time. Dual-writing to a versioned index keeps search working during the migration. A config swap is tempting, but comparing new-model queries against old-model vectors gives meaningless distances. Mixing vectors is only safe if the new model is explicitly trained to be compatible with the old space.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- You are building an IVF index on 20 million vectors. A teammate asks why the build needs a 'training' step before any vectors can be added. What is the reason?
- An HNSW index serves a marketplace where about 30% of listings are updated or removed each week. Each update is applied as a delete plus an insert, and deletes mark tombstones. Over a month, recall@10 drifts from 97% to 89% and p99 latency rises at the same ef_search. What is happening, and what should you do?
- Users delete documents in your primary database, but the deleted documents keep appearing in vector search results for hours. The vector index is rebuilt nightly. What is the best fix?
- Your embedding model outputs unnormalized vectors whose magnitudes vary widely. A teammate wants to switch the index from cosine similarity to dot product because it is cheaper to compute. What is the consequence?
- You are setting an SLO for a new ANN-backed recommendation search over 50 million vectors. A product manager asks for 100% recall@10 with single-digit millisecond latency. What is a realistic response?
- A B2B SaaS app serves 500 customers, and every query searches only one customer's documents. One large customer runs heavy batch queries that slow down search for everyone. Which sharding approach fits best?