Can you switch embedding models in an existing vector database?

Yes, you can switch embedding models, but every stored vector must be regenerated. Vectors from two different models do not share a coordinate space, so an index built with model A cannot answer queries embedded with model B. The switch is a data migration, not a configuration change.

Updated

Why an old index cannot serve a new model

An embedding model maps text to a point in a space it defines itself. The axes of that space have no shared meaning with the axes of another model. Two consequences follow. First, the vector length usually differs: a 768-dimension index cannot store a 1536-dimension vector, and the database rejects the write. Second, even when two models happen to emit the same number of dimensions, a query vector from model B lands in a region that model A never used. Cosine similarity still returns a number, and that number is meaningless. This is the dangerous case, because nothing errors: recall simply drops and nobody notices until users complain.

What actually breaks

Two things do not need to change. A reranker scores text pairs, not vectors, so it survives the migration. A keyword index such as BM25 over the original text also survives, which is why keeping the raw text next to the vector matters.

Plan the migration as a rebuild

  1. Keep the source text and metadata. Without the original chunks you cannot re-embed; you can only re-crawl. Check this first.
  2. Freeze the chunking. Re-embed the same chunk boundaries so that retrieval results stay comparable. Change one variable at a time.
  3. Create a versioned collection such as docs_v2_<model>. Write the model name and its version into the collection metadata.
  4. Re-embed in batches and record the count of chunks written against the count of chunks read. The two numbers must match at the end.
  5. Evaluate both indexes on the same query set before you move traffic. Compare recall at k, not average similarity scores.
  6. Cut over by alias. Point the application at the new collection, keep the old one for a rollback window, then delete it.

Estimate the cost before you start

The bill is the number of chunks multiplied by the average tokens per chunk. A corpus of 200,000 chunks at 400 tokens each is 80,000,000 tokens, and embedding prices are quoted per million tokens. Multiply that figure by the current price of both the old and the new model if you plan to keep both indexes warm. Add storage for the second index, because both copies exist during the migration.

Time is the other budget. Re-embedding is rate limited by the provider, so divide the token total by your allowed tokens per minute to get a floor on the wall-clock time, then add the indexing time of the vector database.

Verify before cutover

If the new model wins on recall but loses on answer quality, the problem is usually in the prompt or the context ordering, not in the embedding. Evaluate the two stages separately before you blame the vectors.