Retrieval-augmented generation (RAG) gives a model selected source material before it writes an answer. It can reduce dependence on stale training data, but it does not automatically make an answer correct. A bad search result, an incomplete document, or a model that ignores its context can still produce a confident mistake.
Measure retrieval separately
Build a test set of questions with the documents that should support them. Measure whether the right passages are retrieved before judging the generated response. Record document freshness, access permissions, chunk boundaries, and ranking behavior. If retrieval fails, changing the prompt is treating the symptom.
Preserve provenance and permissions
Attach a source identifier to every retrieved passage and show citations that a reader can open. Apply the same authorization rules to search that the underlying application uses; hiding a document in the final answer is not a substitute for preventing its retrieval. The OWASP LLM Top 10 is a useful checklist for retrieval and prompt-injection risks.
Define when the system should abstain
When the evidence is missing or contradictory, the product should say so and point the user to the source or a human workflow. Evaluate citation correctness, unsupported claims, latency, and cost together. RAG is an information-access design problem with a model in the middle, not a magic accuracy switch.
A question that exposes the weak link
Imagine an employee asks whether a travel expense is reimbursable. The handbook has two versions: an old PDF and a current policy page. A system can retrieve the old paragraph, cite it correctly, and still give the wrong answer. Index an effective date and document owner, mark superseded versions, and include examples like this in evaluation. Score whether the right policy appeared in the retrieved set before scoring the prose.
Keep the evaluation reproducible
For each test question, store the permitted documents, expected answer or abstention, and the source passage that supports it. Track retrieval recall, grounded claims, and citation accuracy separately. Re-run after changes to chunk size, embedding model, ranking, or permissions. Review a sample of failures by hand because a single average score cannot explain which customers received unsupported advice.
Sources
Background: the original Retrieval-Augmented Generation paper and OWASP Top 10 for LLM applications. These describe the approach and its security risks; product quality still requires evaluation on your own documents.



