A retrieval-augmented generation system can produce fluent answers while retrieving the wrong evidence. That makes stakeholder demos deceptively reassuring and production failures difficult to diagnose: the problem may be indexing, retrieval, ranking, prompting, or generation.
A useful evaluation framework separates those layers. This guide shows how to build a repeatable test set, measure retrieval and answer quality independently, and use failure categories to improve the system rather than endlessly adjusting prompts.
Build a representative test set
Collect real questions across common, difficult, ambiguous, and unanswerable cases. Attach expected source documents, required facts, and acceptable abstentions. Include access-controlled content and recently updated material so the evaluation reflects the environment the application will actually face.
Evaluate retrieval before generation
Check whether relevant passages appear in the candidate set and whether ranking places them high enough for the model to use. Review chunk boundaries, metadata filters, query rewriting, and duplicate results. If evidence is absent, changing the answer prompt cannot solve the underlying problem.
Score grounded answers
Assess factual correctness, citation support, completeness, relevance, and whether the system refuses unsupported requests. Combine automated checks with human review for high-risk questions. Model-based judges can accelerate triage, but calibrate them against expert decisions rather than treating their scores as truth.
Turn failures into engineering work
Tag failures by cause and track results by dataset, retriever, embedding model, prompt, and generation model version. Run the suite before releases and after content changes. Your next step is a small baseline set with clear expected evidence; expand it from production failures, not synthetic variety alone.
