How to evaluate RAG: retrieval and grounded answers
By Future Data Academy · 3 min read · Updated
Separate retrieval coverage from answer support with a five-question RAG evaluation, including missing evidence and misleading citations.
Retrieval-augmented generation combines a search step with an answer-generation step. A weak answer can originate in either part. A single “looks good” rating makes it hard to decide what to improve.
Use a small, permission-safe document collection and a set of explicit questions. Keep the expected evidence alongside each question. The synthetic example below illustrates diagnosis, not a benchmark or a claim about a particular model.
Separate two checks
For each question, ask whether the retrieved material contains the evidence needed to answer it. Then ask whether the generated answer is supported by that evidence. Relevant-looking text is not necessarily sufficient evidence, and a citation alone is not proof of support.
| Question | Supporting evidence retrieved? | Answer supported? |
|---|---|---|
| A | Yes | Yes |
| B | Yes | No |
| C | No | No |
| D | Yes | Yes |
| E | No | No |
Retrieval coverage is 3/5, or 60%. Answer support among the three cases with retrieved evidence is 2/3, approximately 66.7%. End-to-end support is 2/5, or 40%. Always state the denominator: these are not interchangeable scores.
Diagnose the failure before changing the prompt
Question B has usable evidence but an unsupported answer. Inspect whether the generator ignored a condition, blended conflicting passages or invented a missing detail. Check the citation against the exact passage and version.
Questions C and E lack supporting retrieval. Ask whether the permitted collection contains the answer at all. If it does, inspect query wording, chunk boundaries and retrieval ranking. If it does not, a more confident prompt will not create evidence. The system should express that it cannot establish the answer from the available material.
Include difficult cases deliberately
Add a question whose answer is absent, one with conflicting document versions and one requiring two passages. Define which version is authoritative before grading. Include text that tries to instruct the assistant to reveal secrets: retrieved documents are evidence to examine, not permission to override access controls.
A citation to the correct document title can still be misleading if the cited passage does not support the specific claim. Grade the claim, evidence and citation together, and distinguish unsupported claims from claims that are demonstrated false.
Make the review reproducible
Save the question, expected evidence, retrieved passages, generated answer, document version and grading notes. Have reviewers use the same rubric. When they disagree, identify the claim or criterion causing the disagreement rather than averaging incompatible judgments without explanation.
Use a separate evaluation set after tuning. Repeatedly adjusting retrieval against the same five questions teaches you about those questions; it does not establish broad reliability. Larger, representative samples and access-control checks are needed before real deployment.
Your next exercise
Create five questions about a synthetic academy policy. Include one unavailable fact and one outdated policy paragraph. Score retrieval and answer support separately, then recommend one change based on the failure pattern.
Continue with Retrieval-Augmented Generation and Prompting and AI Evaluation. Use your course notes to keep the rubric and examples together.
