Key takeaways
Retrieve only knowledge the user is permitted to access.
Evaluate retrieval and generation as distinct stages.
Make source attribution and abstention visible in the product experience.
Begin with the knowledge decision
Retrieval-augmented generation is useful when a task depends on information that is too specific, recent or governed to rely on model memory. Define the audience, source authority, update cadence and tasks before choosing an embedding model. An internal policy assistant should distinguish approved policy from drafts, obsolete guidance and informal discussion.
Establish an ingestion contract covering document identifier, version, owner, effective date and access permissions. Preserve these attributes when documents are split into passages.
Design retrieval around relevance and permission
Choose chunking based on document structure rather than an arbitrary fixed size alone. Preserve headings and table context where needed. Combine lexical and semantic retrieval when the task includes exact terms as well as paraphrased questions. Reranking can improve the ordering of candidate passages but cannot repair missing source coverage.
Apply access restrictions before exposing candidate passages to a model or user. Record the identifiers of retrieved passages and their document versions.
Assemble context and cite responsibly
Give the model an explicit task, relevant evidence and a response contract. Ask it to separate direct support from inference and to acknowledge when sources are incomplete. Treat text inside retrieved documents as untrusted content rather than executable instruction.
A citation is not proof of correctness by itself. Validate that cited passages actually support each important claim. Where sources conflict, identify the conflict rather than synthesising a falsely definitive answer.
Evaluate the end-to-end answer
Construct a test set from realistic questions with labelled reference passages and expected answers. Measure retrieval recall separately from the fraction of generated claims that have support. Include unanswerable questions and access-restricted cases. Track response time and correction effort so that improvement reflects actual user needs.
Apply the approach
A fictional policy assistant evaluation uses 20 questions. Across those questions, 50 reference passages are labelled relevant, and 42 appear in the top five retrieved passages for their respective questions. Of 20 answers, 16 have every material claim supported. This is a worked example, not a benchmark.
42 retrieved relevant passages / 50 labelled.
16 / 20 answers.
Inspect missing evidence, retrieval rank and unsupported claims.
Put the approach into practice
- 01Inventory sources and access rules.
- 02Label representative retrieval and answer cases.
- 03Implement citation and abstention checks.
- 04Review failed questions with document owners.
Frequently asked questions
Does RAG eliminate hallucinations?
No. Missing, conflicting or poorly interpreted evidence can still produce unsupported answers; evaluation and abstention remain necessary.
When should I fine-tune instead?
Consider fine-tuning for stable behaviour or task patterns. Use retrieval when the answer depends on governed or frequently changing facts.