Start with sources and ownership
Retrieval augmented generation, or RAG, supplies an AI system with source material to use when preparing an answer. Its usefulness depends on which sources are available and how well they represent the question. Improving a search algorithm cannot by itself resolve an outdated policy or decide which conflicting document is authoritative.
Create a source register before tuning retrieval. Record what each source contains, who owns it, who may access it, how updates arrive, and what should happen when sources disagree. Start with a focused collection that an accountable owner can review rather than assuming every available document belongs in the system.
Apply access rules before using content
A relevant passage is not an appropriate input if the requesting user is not allowed to read it. Carry the user's identity and access context through retrieval, and enforce the applicable permissions before restricted content is supplied to the model. A displayed source link is not a substitute for controlling the content used in the answer.
Test access changes as part of the workflow. Consider removed group membership, a restricted document, a queued request, and cached results. The design should define how current permissions are checked and how the system behaves when it cannot establish access, rather than relying on the model to withhold information it has already received.
Make updates and failures observable
Track a source change through collection, processing, indexing, and availability to the application. A successful fetch does not prove the updated passage can be retrieved. Give the operating team visibility into failed updates, deleted sources, processing errors, and the last confirmed version available for use.
Set an update expectation for each source based on the workflow it supports. Define who responds when that expectation is missed, and whether the application should disclose the age of the material, withhold an answer, or direct the user to the authoritative system. Those decisions need an owner as much as they need a pipeline.
Separate retrieval quality from answer quality
Build an evaluation set from representative questions and have a knowledgeable reviewer identify the relevant sources and expected response. Include questions the collection cannot answer, conflicting versions, and permission differences. A correct refusal or request for clarification should be an expected outcome where the evidence is insufficient.
Inspect the retrieved passages before judging the generated answer. If the right source was absent, investigate coverage and retrieval. If it was present but the answer misused it, investigate context selection and generation. Check citations against the specific statements they support: the presence of a citation alone does not establish that an answer is accurate.
Illustrative example
Illustrative check: a revised internal policy
Identify the authority
Record the policy owner, current approved version, permitted audience, and the source that should take precedence over older copies.
Verify the update
Confirm that the revised source reached the searchable index and that the earlier version is handled according to the retention and retrieval rules.
Test access changes
Repeat the question as a permitted user and as a user whose access was removed. Check retrieved passages, generated answers, caches, and displayed source links.
Inspect the evidence
Check whether retrieval found the relevant current passage and whether the answer accurately used it. Route a missing source, poor retrieval, or unsupported answer to the appropriate owner.
What evidence would your team need to operate this capability with confidence?
Apply this to your project
Explore the engineering services behind these decisions.