Vectors from different embedding models live in different spaces and cannot be compared with each other. When you change the model, for example from text-embedding-ada-002 to text-embedding-3-small, every document must be re-embedded with the new model, or the index will mix two spaces and return nonsense rankings. Rebuild the whole index, do not mix old and new vectors.
Prerequisites
- The full list of documents in the current index.
- Access to the new embedding model.
- A small set of test questions with known good answers.
Steps
Step 1: Freeze the old index
Stop writing to the old index and note which model and dimension count it uses. Keep it running while you build the new one, so search keeps working during the rebuild.
Step 2: Re-embed everything
Embed every document with the new model, using the same dimension count for all of them, and store the new vectors in a fresh index. Do not copy any vector from the old index.
Step 3: Check the new ranking
Run your test questions against the new index and compare the top results with the old index. Switch traffic to the new index only when the test questions return the right documents.
Worked example: Maple Corner bakery recipe index
The fictional Maple Corner bakery moves 1,200 recipe notes from an older embedding model to text-embedding-3-small.
| Step | Documents | Model | Status |
|---|---|---|---|
| Old index frozen | 1,200 | Older model | Still serving search |
| New index built | 1,200 | text-embedding-3-small | Ready to test |
| Test questions | 10 questions | text-embedding-3-small | 10 of 10 correct |
| Switch traffic | 1,200 | text-embedding-3-small | Done |
All 1,200 documents are re-embedded with the new model, 10 of 10 test questions return the right documents, and search is switched to the new index.
Expected result. The new index holds only vectors from the new model, and test questions confirm the ranking before the switch. UNTESTED: this guide was not run against a live model or API. The worked example below is fictional practice material, and its result is the expected result, not a measured one.
Limits
- Re-embedding costs tokens for every document; budget for the full corpus, not a sample.
- Changing the dimension count at the same time as the model is a second change; do one at a time.
- This guide does not cover choosing the new model.
