Build the dataset around real information needs
I begin with representative user questions rather than generated variants alone. For every example, the dataset should capture:- the raw request and relevant user context;
- the intended source scope and access constraints;
- required documents or evidence passages;
- the main answer points;
- claims that must not appear;
- acceptable refusal or clarification behavior;
- intent, difficulty, language, and risk labels.
Evaluate retrieval before generation
Retrieval evaluation asks whether the system found useful evidence and ranked it high enough for the answer layer. Common metrics include:- Recall at k: whether at least one required source appears in the candidate set;
- Precision at k: how much of the selected context is relevant;
- MRR: how early the first relevant result appears;
- nDCG: how well the complete ranking reflects graded relevance;
- filter correctness: whether access, status, language, and date constraints were applied.
Evaluate grounded answers and citations separately
Once retrieval is understood, I assess:| Dimension | Evaluation question |
|---|---|
| Groundedness | Is every material claim supported by the supplied evidence? |
| Completeness | Does the answer cover the required points without hiding uncertainty? |
| Citation validity | Does each citation point to an accessible passage that supports the claim? |
| Policy behavior | Did the system clarify, refuse, or escalate when evidence was insufficient? |
| Presentation | Is the answer usable for the intended workflow and audience? |
Evidence attached to a release candidate
Turn metrics into risk-based release decisions
There is no universal groundedness or recall threshold that makes every RAG system safe. A release gate should be established from a validated baseline, the importance of each intent, the cost of a wrong answer, and the noise of the evaluator. I use three categories:- Hard blockers for authorization failures, inaccessible citations, prohibited claims, and critical unsupported answers.
- Segmented comparisons for important intents, languages, source families, and difficult questions.
- Trend review for quality, latency, cost, fallback, and coverage movements that require context.