Skip to content
Quantoros

Your new embedding model has different dimensions from existing vectors. How do you handle migration?

NLPLevel: IntermediateTroubleshooting Scenarios

Your new embedding model has different dimensions from existing vectors. How do you handle migration?

Hints
  • What does closeness mean in this representation and metric?
  • Check normalization, exact versus approximate search and alignment with the training objective.

Answer

You cannot mix vectors of different dimensions in the same HNSW index.

Migration plan:

  1. Build shadow index with new model — embed all documents in background; validate quality
  2. Test quality on eval dataset — confirm new model improves or matches old
  3. Dual-query transition — during cutover period, query both indexes; merge results by score normalization
  4. Atomic switchover — when shadow index is complete and validated, swap the primary index pointer
  5. Decommission old index after confidence period

Avoid: gradual migration where some documents are in new index and some in old — split indexes cause inconsistent retrieval quality.

Source and licence: JustInCache & contributors — Awesome AI Interviews · Apache-2.0

Related questions