Design the migration plan when upgrading a 500M doc index from text-embedding-3-small to 3-large
You operate a 500M document RAG index built on OpenAI text-embedding-3-small (1536 dim). You want to migrate to text-embedding-3-large (3072 dim) for the quality gain. Outline the migration plan including cost, downtime risk, and the cutover strategy.
Run a parallel-index migration: re-embed all 500M docs to a new index for around $16K via batch, dual-write, shadow-test recall on a labeled set, then atomic cutover.
Picture moving a giant library from one cataloguing system to another. You cannot mix the two systems on the shelf because the call numbers will not line up. So you build a parallel set of shelves in the next room, copy every book over with the new catalogue, run patrons against both libraries quietly to confirm the new shelves find the same books, then on a Saturday night you switch all the signs and start sending patrons to the new room. The old shelves stay in place for a week in case you have to roll back. That is exactly what a search-index upgrade looks like.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Embedding-model migrations are stateful-service migrations. The pattern is the same as upgrading a database, swapping a search index, or rotating an authentication backend: build the new thing in parallel, dual-write, validate, cut over atomically, retain rollback. The specifics for embeddings are the cost math and the validation harness.
This question rewards a candidate who has actually run one of these migrations. The clean answer names the four stages, does the cost arithmetic, flags the MTEB to corpus generalization risk, and considers Matryoshka truncation as a middle path. A weaker answer treats it as a fresh problem and reaches for ad-hoc solutions like in-place upgrade or incremental refresh.
Why incremental upgrade does not exist for embeddings
The intuition behind 'let new docs use the new model, leave old docs on the old model' is that you save the cost of re-embedding the back catalogue. The intuition is wrong because embedding models live in unrelated coordinate systems.
A query gets embedded by exactly one model. When that query vector hits a vector database holding a mix of old-model and new-model vectors, the cosine similarity between the query and each indexed vector is meaningful for same-model pairs and noise for cross-model pairs. The top-K results mix correct neighbors with accidental ones. Recall@K typically drops 30-50% depending on the mix ratio.
The vector database does not catch this. Pinecone, Weaviate, Qdrant, pgvector all store float arrays without knowing which model produced them. The bug is silent. So 'incremental' is not a viable mode for embedding-model upgrades. You either swap everything or nothing.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- OpenAI's text-embedding-3 documentation explicitly recommends a parallel-index pattern for migrating from text-embedding-3-small to text-embedding-3-large.
- Pinecone's 2026 embedding-migration guide ships templates for the dual-write plus shadow-test stages on managed indexes.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you reduce the cost of the migration if budget is tight?
Use the batch API for 50% discount; consider Matryoshka truncation of text-embedding-3-large to 1536 dim to keep storage and query cost flat; or stage the migration to a subset of the corpus first.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating the migration as an incremental refresh where old documents stay on the old model; this produces a silently broken mixed-model index.
60 second bullets to scan on the way to the call.
Why incremental upgrade is impossible
Cost arithmetic: tokens, sync vs batch price, storage doubling
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.