Re-Indexing Agent Memory After a Model Change: Steps and Tests
Rebuild a vector index after changing embedding models: freeze the corpus, re-embed, run side-by-side retrieval tests, then cut over with a rollback path.

To re-index a vector database after an embedding model change, re-embed every record with the new model into a separate index, never overwrite the live one in place, and compare both indexes on the same test questions before you switch traffic. Vectors produced by different models do not share a meaning space, so mixing them returns matches that look plausible and are often wrong. Treat the migration as a rebuild with a rollback path, not as a patch.
Key takeaways
- Vectors from two embedding models are not comparable, so every record must be re-embedded rather than partly updated.
- Build the new index beside the live one and switch only after side-by-side retrieval tests pass.
- Draw test questions from real work, including questions the old index already answered correctly.
- Copy access and expiry metadata with each record so the rebuild does not widen what an agent can see.
- Keep the old index and its settings until the new one has run long enough for review, then retire it on a recorded decision.
Why a model change breaks retrieval without an obvious error
An embedding model converts text into a list of numbers that places similar meanings close together. Each model draws its own map, so a query embedded with the new model and compared against vectors from the old model measures distance on two different maps. The system still returns results, and the agent still writes a fluent answer, which is why the failure is quiet. A refund question may pull a general article instead of the regional policy, and nobody sees an error code.
This is also why a change of model looks harmless in a demo and causes trouble in production. The demo uses a few familiar questions. Production uses the abbreviations, misspellings and internal terms that staff actually type. For background on how agents find company content through vectors, see What Are Embeddings in AI? How Agents Find Company Content.
Step-by-step plan for the rebuild
- Freeze the source set. Record which document versions, collections and chunk settings the rebuild will use, and log any edits that arrive during the build so they can be re-embedded.
- Write an index manifest outside the vector store. Include the embedding model name and version, vector dimension, distance metric, chunk size, overlap and build date.
- Re-embed every chunk with the new model into a new collection or namespace. Never write new vectors into the live collection.
- Copy metadata unchanged: source, document version, owner, scope and expiry fields. Access rules depend on this metadata, so a dropped field is effectively a permission change.
- Check the build before testing. Compare the count of vectors with the count of source chunks, look for empty or truncated chunks, and confirm that every deleted or expired record is absent from the new index.
- Run the side-by-side retrieval tests described below against both indexes, using identical queries.
- Review differences with the owners of the documents, not only with the engineers who built the index.
- Cut over behind a switch, keep the old index for a review period, and rehearse the rollback before you need it.
Build a side-by-side retrieval test before cutover
A side-by-side test runs the same questions against the live index and the candidate index, then records what each one returns. Build the question set from requests your staff actually handle. For each question, write down the document that should come back, and if the answer is supposed to be absent from the records, say so. Group the questions so the test covers the cases that matter most: direct policy lookups, questions phrased with synonyms or internal jargon, questions about recent changes, questions whose answer is not in the records at all, and questions from roles that must not see certain documents.
For each question, log the top results from each index, the rank of the expected source, and whether the agent's final answer cites that source. A spreadsheet is enough at the start. What matters is that both indexes are scored the same way and that the results are read by someone who knows the business. Evaluation guidance from model providers, including the evals guides published by OpenAI and Anthropic, follows the same pattern: define the expected behavior first, then score each version against it.
Illustrative scenario: a support team moves its agent to a new embedding model. The candidate index finds the general refund article for most phrasings, but for questions that use a regional term it returns a neighboring article and misses the regional policy. The team adds the term to the company glossary, then reruns the identical question set before cutover, which is the reason to keep the test fixed. Glossary terms are covered in Company Glossary for AI Agents: Terms Agents Must Use.
Decide what counts as a pass
Agree the pass rules before you open the scores, or the results will be argued into whatever the team already preferred. A workable decision guide has five questions:
- Does the expected source appear in the top results for every high-stakes question, not only on average across the set?
- Has any question that the live index answered correctly started failing, and if so, is there an explained reason the owner accepts?
- Do restricted documents stay invisible to roles that should not see them, including through near-match results?
- When the answer is absent from the records, does the agent say so instead of citing the closest document?
- Are response time and cost per query within the range the operations owner already accepted for this agent?
If any answer is no, the candidate is not ready. Fix the cause, whether that is chunking, a missing glossary term, a metadata gap or a document that should be split, then rerun the full set. Do not rerun only the questions that failed, because a fix for one case often shifts another. For a repeatable way to structure this kind of check, see How to test retrieval quality in an AI knowledge base.
Cut over and keep a rollback path
Switch the agent to the new index through a configuration setting rather than a code change, so the change and its reversal are both small. Log which index and which manifest served each answer. Those logs let you tell, weeks later, whether a complaint came from the old model or the new one. After cutover, keep monitoring the same test questions, plus a sample of live requests reviewed by staff.
Keep the old index and its manifest until the review period you agreed has passed. Define the rollback trigger in advance, such as a failed high-stakes question that the owner cannot accept, and rehearse switching back in a non-production setting. Retire the old index only after a recorded decision. Backups should cover the manifest and the metadata, not only the vectors, as described in Backing Up AI Agent Memory: Restore Drills That Prove It Works.
How Be Human handles embedding changes in managed operations
Be Human treats an embedding change as a controlled change to an agent's memory, not as an infrastructure detail. In a managed engagement, the index manifest, the question set and the pass rules are kept with the agent's operating records, and the side-by-side tests run with the business owner who approves the result. The memory scopes and approval boundaries defined at the start carry into the new index, so a model change does not quietly widen what the agent can see. Rebuilds, cutovers and rollbacks are handled as part of monitoring, permission review and incident response.
Take the free Be Human AI diagnostic to find the first task worth handing to an agent.
Frequently asked questions
Do I need to re-index everything if only the chunk size changed? Usually yes. Changing chunk size alters which text each vector represents, so the existing vectors no longer match the content you would embed today. Rebuild with the new settings recorded in the manifest, then run the same side-by-side tests you would run for a model change. Change one variable per candidate where you can, so a regression has a clear cause.
Can I keep the old index and only embed new documents with the new model? A partial mix is not a safe interim state, because vectors from the two models cannot be ranked against each other. Run a full rebuild into a new index with one manifest, and keep the old index only as the rollback path. Adding new documents is simpler once the rebuild has been tested and accepted.
How long should the old index stay available after cutover? Keep it until the review period your operations owner agreed has ended and the rollback trigger has not fired. The period should be long enough to catch questions that come up rarely, such as seasonal or year-end policies, which a short review can miss. Record the decision to retire the old index, with the approving owner, so the removal is traceable.
Who should approve the cutover? The business owner of the process the agent supports should approve, because they can judge whether a retrieved answer is acceptable. The engineer who built the index should confirm the technical checks, and the owners of the source documents should review differences in their areas. A technical sign-off alone is not enough, because the test that matters most is whether the answers are right for the business.
Your next step
See where an AI agent fits in your company first.
Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.
Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.


