Suppose a data engineer maintains an assistant that helps support staff find product documentation. It embeds each question, retrieves similar document passages, and passes them to a language model to compose an answer. In this hypothetical system, the engineer changes the embedding model in the application configuration. The document vectors still come from the previous model.
The service can remain available while retrieval becomes unreliable. Equal vector lengths do not establish that two models place related text near each other. I would release the query embedding configuration together with a corpus generated for it, and keep the previous pair available for rollback.
Embedding configuration includes more than a model name. Amazon Titan Text Embeddings V2, for example, accepts output dimensions and normalization settings. Its supported dimensions are 1,024, 512, and 256. Changing the dimension affects the stored representation even when the model identifier stays the same.
For the support assistant, I would assign each retrieval generation an immutable identifier. Its configuration would specify the model, dimensions, normalization, distance metric, and document preprocessing version. Each stored chunk would also retain its document ID and source revision. These are application design choices that make the migration inspectable.
The database cannot infer that history from a vector. The pgvector documentation shows how multiple models can share a table using model IDs and separate partial indexes. A fixed dimension provides a useful structural check, but it does not prove which model produced the values. For an initial migration, I would use separate tables and indexes to make accidental mixing harder.
Build the new generation while the existing one serves requests. Re-embed the source text with the candidate configuration; avoid treating a resize or cast of existing vectors as a model migration. Keep chunk boundaries unchanged for the first comparison so that a retrieval difference is easier to diagnose.
The backfill also needs a completion boundary. Product documentation can change while embeddings are being generated. Capture source revisions, apply subsequent updates and deletions to the candidate, and reject late results for superseded revisions. A matching row count would miss an obsolete paragraph paired with a missing replacement.
Once the candidate has caught up, run representative support questions through both complete retrieval paths. Each path must generate its own query vector. This pairing is explicit in Pinecone’s integrated embedding design, where the configured model embeds both documents and queries. For a custom pipeline, the application has to preserve that relationship.
Compare whether the retrieved passages answer the questions, alongside latency and indexing cost. Do not assume the old similarity cutoff has the same meaning for the new model. Recheck the assistant’s decision to answer or report insufficient evidence.
Switch one application configuration reference that selects both the query embedding settings and the target corpus. Resolve it once per request so an in-flight request cannot embed against one generation and search another.
Keeping two generations costs storage and ingestion work. A small, rarely changed corpus may justify a maintenance window instead. For the live support assistant, I would retain the old generation through a defined rollback period and keep its document updates flowing. Rehearse the switch back, including a document edited during migration. Release the candidate when it improves passage selection without losing current content, and remove the old generation only after that rollback period closes.