Hard20 minAI Engineering
UpdatedAug 6, 2026
Edit

Vector Search: Re-embed Safely

Question Variations

  • "Why should embeddings be versioned?"
  • "How would you roll back a bad embedding migration?"
  • "How would you upgrade embeddings for millions of documents without disrupting search?"

Why This Is Asked

This tests whether a candidate can operate an embedding migration as a safe production rollout. Interviewers assess versioning, backfill completeness, shadow evaluation, gradual cutover, and rollback rather than a risky in-place rebuild.

Key Concepts

  • Versioning: Store embedding model and chunker version with each vector.
  • Dual read/write: Build a new index while serving the proven one.
  • Evaluation: Compare retrieval quality and latency before traffic migration.
  • Rollback: Keep the previous index available until the new path is proven.

Question Variations

  • “Why should embeddings be versioned?”
  • “How would you roll back a bad embedding migration?”
  • “How would you upgrade embeddings for millions of documents without disrupting search?”

Answers by Technology

+ Add Variant
System DesignImprove this answer ✏️

Expected Answer

Treat an embedding change like a schema migration. Version the model and chunker, build a new index while serving the old one, dual-write new documents, and reconcile backfill completeness. Compare both paths on a golden set and shadow traffic for recall, latency, cost, and permission behavior. Shift traffic gradually behind a flag and keep the old index until rollback is no longer needed.

Why It Matters

An embedding migration can silently degrade search for the whole corpus.

Common Mistakes

  • In-place overwrite: There is no safe rollback or comparison.
  • Skipping backfill reconciliation: Some documents remain searchable only in the old index.

Follow-up Questions

  • Why version embeddings? (Answer: Model changes alter vector meaning.)
  • How is rollback done? (Answer: Route reads back to the retained prior index.)