Start with the source owner, not the vector index
Updating a RAG knowledge base should begin in the source system. For every policy, manual, contract, catalog, or procedure, assign a person or team responsible for approving changes, stating the effective date, and confirming when a version is no longer valid. The team operating search can execute the process, but it should not independently decide which business content is correct.
Record every source in an inventory with a stable identifier, name, responsible area, original location, expected review frequency, access classification, language, publication date, effective date, and status. The identifier should remain the same when a document is revised, while the version changes. This separation supports audits, response investigations, and reconstruction of the knowledge base as it existed on a specific date.
- Treat the original source as authoritative and the vector index as a searchable projection of it.
- Set a review period for each content type, but do not confuse a review deadline with automatic expiration.
- Specify who may publish, replace, withdraw, and restore each document class.
Sources and references: [1]
Version documents as software artifacts
A safe update should not silently overwrite the previous file. Generate an immutable version with its own identifier, content hash, change author, reason, publication date, and effective date. Link that version to the previous one and mark whether it replaces, supplements, or corrects the document. The pipeline can then reproduce the published set and explain why a particular passage was indexed.
Add metadata to the file or its associated record before ingestion. Region, product, audience, language, status, and validity period allow retrieval to be restricted when a question requires context. The Retrieval API documentation describes attribute filters, including combinations involving date, region, and file name. This does not replace governance, but it helps prevent a future version or draft from appearing in an unsuitable query.
- Use explicit states, such as draft, approved, active, replaced, withdrawn, and archived.
- Maintain a relationship between the old and new versions instead of relying only on the file name.
- Avoid ambiguous names such as final.pdf or updated.docx; the record should carry the meaning of the version.
Sources and references: [1]
Update through atomic replacement and withdraw expired content
For a significant change, prepare the new version outside the active set, ingest it, wait for processing to finish, and check its metadata before releasing it. The reference explains that files added to a vector store are chunked, transformed into embeddings, and indexed, and that some operations are asynchronous. Therefore, treating an upload as complete at the moment it is sent can publish a document that is still incomplete.
When the new version is available, change the active set in a controlled way. In larger systems, a useful strategy is to build a candidate collection, run the tests, and switch the reference used by the application. If the architecture does not allow that switch, remove the previous version only after the new one is searchable, while keeping a documented rollback plan.
Withdrawal deserves its own workflow. Mark the document as withdrawn in the inventory, remove it from the production index, record the reason, and prevent the pipeline from importing it again. The documentation also warns that removing files from a vector store is eventually consistent, so old results may appear briefly. During this window, status and validity filters, together with a temporary cautionary response for sensitive topics, reduce the risk of using expired content.
- Do not reuse the same logical identifier to conceal a change without preserving the history.
- Check ingestion status before promoting a version, and record failures for reprocessing.
- After withdrawal, test queries that previously found the document and monitor remaining references.
Sources and references: [1]
Test retrieval and responses after every change
A knowledge base change can affect both the retrieved passages and the final response. Maintain a representative question set with the expected answer, authorized sources, valid versions, and cases where the correct answer is that there is insufficient information. Include questions with synonyms, typing errors, multiple intents, competing documents, and requests that mention a withdrawn policy.
Separate the diagnosis into stages. First, check whether search finds the correct documents and does not find prohibited versions. Then verify that the retrieved passages contain enough evidence. Finally, assess whether the response uses that evidence, respects validity, and avoids inventing a conclusion. Evaluation guidance recommends task-specific tests, continuous execution after changes, and expanding the set with real and edge cases.
Compare the current version with the previous one using criteria that can reject a release, such as retrieval of an authorized source, absence of withdrawn documents, coverage of critical questions, and fidelity to the passage found. Do not turn an average into automatic approval: a failure involving a high-impact policy may require a block even if other questions improved.
- Test questions whose answers changed and questions whose answers should remain the same.
- Include boundary cases, such as two regions, two languages, or two versions with nearby dates.
- Record the query, knowledge-base version, retrieved documents, response, and approval or rejection reason.
Sources and references: [2]
Operate the knowledge base as a publishing process
Create a workflow with observable stages: detect a source change, validate the file, extract metadata, ingest it, verify processing, run evaluations, publish, monitor, and withdraw when necessary. Each stage should produce a record showing who started the action, which version was affected, which set was active, and what the result was. Alerts should identify incomplete ingestion, missing metadata, rising obsolete results, and test failures.
Access control also belongs to maintenance. Retrieved content may contain malicious instructions or data that should not influence decisions. Security guidance recommends isolating untrusted text, using structured outputs between stages, and preventing external data from being inserted into higher-privilege messages. For a business knowledge base, this means treating documents as data to cite, not as instructions for changing system behavior.
Consider a hypothetical situation: a company updates its reimbursement policy to separate purchases made in Brazil and Chile. The policy owner publishes version 4, with region, effective date, and replacement relationship. The pipeline ingests the new version, tests questions from both countries, and activates it only afterward. Version 3 is withdrawn from the searchable set but remains in the history. If a query still retrieves the old version, the release is halted until the reason is identified.
- Make publication depend on minimum tests defined by the business, not merely on a load completing without errors.
- Keep an audit trail separate from the index to preserve history and support investigation.
- Reassess the test set when new sources, products, regions, or question types appear.
Put it into practice
- Assign a business owner and an operational owner to each relevant source.
- Record immutable versions with effective date, hash, status, replacement relationship, and scope metadata.
- Define a promotion, withdrawal, reprocessing, and rollback procedure for each document type.
- Maintain tests for retrieval, validity, fidelity, and absence of withdrawn content before publication.
- Monitor ingestion, obsolete results, evaluation failures, and changes to the active set.
Common questions
Should I delete the old version as soon as the new one is published?
Not necessarily. Withdraw the old version from the production search set, but preserve its record and file in controlled storage when operational, historical, or audit needs require it.
How often should a RAG knowledge base be updated?
The frequency should follow the source's volatility and risk. Policies that change often require detection and testing closer to the event, while stable content can follow a scheduled review.
Does a completed upload mean the document is already ready for queries?
No. Ingestion may be asynchronous and must reach a completed state before publication. After that, retrieval, validity, scope, and behavior involving withdrawn documents still need to be tested.
Sources and references
- OpenAI: Retrieval ↗Accessed on October 6, 2026
- OpenAI: Evaluation best practices ↗Accessed on October 6, 2026
- OpenAI: Safety in building agents ↗Accessed on October 6, 2026



