A reliable RAG system is not finished when documents are embedded for the first time. This checklist shows how to keep a knowledge base synchronized as source records change, disappear, or become restricted, using stable IDs, incremental indexing, deletion handling, permission metadata, and regular reconciliation.
Overview
Retrieval-augmented generation depends on the quality and currentness of the retrieval layer. If the source system says that a policy changed yesterday but the vector index still contains last month’s version, the language model may produce a fluent answer based on obsolete content. The same problem occurs when a deleted document remains searchable or when a user can retrieve chunks they are no longer allowed to access.
Think of RAG data ingestion as a synchronization pipeline rather than a one-time import. The pipeline should answer five questions for every indexed document:
- Which source record does this chunk belong to?
- What version of the source record was indexed?
- When was it last successfully processed?
- Should it still be searchable?
- Which users, groups, tenants, or roles may retrieve it?
Keep a canonical source identifier separate from the vector database’s internal point or record ID. A useful ID might combine a source name, tenant, and document ID, while each chunk adds a deterministic suffix such as a chunk number or content hash. This makes updates and deletions targeted instead of dependent on fragile text matching.
Also preserve an ingestion manifest outside the vector store. For example:
{
"source_id": "kb-4821",
"source_uri": "/policies/access-control",
"source_version": "2026-11-20T14:30:00Z",
"content_hash": "sha256:...",
"chunk_ids": ["kb-4821:001", "kb-4821:002"],
"status": "indexed",
"permissions_version": "group-sync-184",
"indexed_at": "2026-11-20T14:34:12Z"
}
The exact fields can vary, but the manifest should make it possible to compare the source, ingestion process, and index without inspecting every embedding manually.
Checklist by scenario
When a source document is created
- Assign or capture a stable source ID before parsing the document.
- Record the source location, tenant, owner, and access-control attributes.
- Normalize the content while retaining useful headings, labels, and timestamps.
- Split the document using a repeatable chunking rule.
- Generate deterministic chunk IDs and store the parent source ID in metadata.
- Write the ingestion manifest only after all chunks are indexed successfully.
- Run a retrieval test using a question that should find the new content.
When a document is updated
- Detect the change using a source revision, modified timestamp, content hash, or equivalent signal.
- Compare the new source version with the indexed version. Avoid re-embedding unchanged content when a reliable comparison is available.
- Remove or replace the old chunk set before publishing the new set, depending on whether your application favors temporary unavailability or temporary duplication.
- Index the new chunks with the same stable parent ID and updated version metadata.
- Verify that no old chunks remain searchable.
- Update the manifest after the replacement and record failures for retry.
A common safe pattern is “replace by parent ID”: identify every indexed chunk belonging to the source document, delete that set, and then write the newly generated chunks. If your vector database supports atomic replacement or namespaces, use those capabilities where appropriate. Otherwise, design the operation to be idempotent and make partial failures visible.
When a document is deleted or moved
- Receive a deletion event or discover the missing source during a full reconciliation.
- Resolve the stable source ID rather than relying only on the current URL or title.
- Delete every chunk, summary, parent record, and auxiliary index entry associated with that ID.
- Mark the manifest as deleted and retain an audit record of the operation.
- Test retrieval for a question that previously matched the document.
Deletion semantics differ among vector stores and connectors. Confirm whether a delete operation is immediate, asynchronous, namespace-scoped, filter-based, or limited to a particular record ID. A successful API response does not by itself prove that every derived representation has disappeared from retrieval.
When permissions change
- Define the authorization source of truth, such as a document-management system or identity provider.
- Store permission metadata on every retrievable chunk, or use a reliable parent-level lookup before retrieval results reach the model.
- Version permission data so you can identify which records have stale access metadata.
- Synchronize grants and revocations independently from content changes.
- Apply authorization filtering before context assembly, not after the model has received the text.
- Test both positive access and negative access for users, groups, and tenants.
Metadata filters can be useful, but check their limitations: supported operators, missing-field behavior, nested attributes, filter performance, and whether every query path applies the same filter. For sensitive data, treat retrieval authorization as a separate security control, not merely as a prompt instruction. The prompt injection prevention checklist provides related guidance for keeping retrieved content from controlling application behavior.
When running a scheduled reconciliation
- Export the current source ID set and the indexed parent ID set.
- Find source records missing from the index.
- Find indexed records missing from the source.
- Compare versions, hashes, chunk counts, and permission versions.
- Repair discrepancies with bounded, observable jobs.
- Report unresolved differences to an owner instead of silently ignoring them.
Use event-driven ingestion for low latency and scheduled reconciliation for completeness. A schedule can be managed with a reviewed cron expression; see the cron expression guide when designing recurring audits.
What to double-check
- Identity: Is the source ID immutable when a title or URL changes? Are tenant and repository identifiers included where necessary?
- Change detection: Can the pipeline distinguish a real content change from a timestamp-only change? Are updates missed when a connector does not emit events?
- Chunk replacement: Can you delete all chunks for a parent document, including old chunks left behind after rechunking?
- Deletion: Are summaries, keyword indexes, caches, and reranking stores removed along with vectors?
- Permissions: Does every retrieval route enforce the same tenant and user filters? What happens when permission metadata is absent?
- Failures: Are retries idempotent? Is a document marked indexed only after every required operation succeeds?
- Observability: Do logs include source ID, version, operation, status, attempt number, and error reason without exposing sensitive content?
- Validation: Do tests cover stale content, deleted content, denied access, duplicate chunks, and partially failed batches?
Keep source-to-index checks separate from answer-quality checks. A retrieval evaluation can tell you whether relevant content is returned, while a synchronization audit tells you whether the content should exist in the index at all. Both are needed for dependable LLM applications. For broader evaluation design, use a repeatable test set and metrics as described in the LLM app evaluation guide.
Common mistakes
| Symptom | Likely cause | Practical fix |
|---|---|---|
| Answers cite an old policy | Updates append new chunks without removing old ones | Replace chunks by stable parent ID and test for old-version retrieval. |
| A deleted page still appears | Deletion events are unsupported, missed, or scoped incorrectly | Run source-to-index reconciliation and verify delete behavior with a test record. |
| Some users see too much content | Permission metadata is missing, stale, or applied after retrieval | Filter before context assembly and test revocations as well as grants. |
| Documents are duplicated | IDs are generated from changing URLs, titles, or random ingestion runs | Use deterministic IDs based on the canonical source identity. |
| Manifest says indexed, but search fails | The manifest is written before all vector or metadata writes complete | Commit status only after validation and make failed steps retryable. |
| Reindexing creates inconsistent results | Chunking, preprocessing, or embedding settings changed without versioning | Record pipeline and embedding versions, then rebuild deliberately when they change. |
Do not treat a full rebuild as the only recovery method. Rebuilds can be useful after a schema or embedding change, but a well-designed incremental indexing RAG pipeline should also repair individual documents, permission changes, and missed events without reprocessing the entire corpus.
When to revisit
Review this checklist before seasonal planning cycles, source-system migrations, major permission changes, index rebuilds, or changes to chunking and embedding configuration. It should also be part of a regular freshness audit rather than an emergency-only procedure.
At each review, select a small test set that includes a newly created document, an updated document, a deleted document, a document with revoked access, and a document shared across tenants or groups if your system supports those boundaries. Record expected retrieval behavior, run the tests with representative identities, and compare the results with the ingestion manifest.
Finally, update the connector and vector-store portions of your runbook whenever their APIs, deletion semantics, filtering behavior, or synchronization capabilities change. A practical completion checklist is:
- Stable source and chunk IDs are documented.
- Change, deletion, and permission events have defined owners.
- Incremental indexing is idempotent and retryable.
- Reconciliation compares source records with indexed records.
- Unauthorized retrieval is tested before production release.
- Manifests, logs, and alerts expose unresolved drift.
- Recovery steps have been tested on a limited set of documents.
When these controls are in place, keeping a RAG knowledge base updated becomes an observable maintenance workflow rather than a sequence of ad hoc reimports. For surrounding automation, retry, and audit patterns, see the AI workflow automation design checklist.