A fluent answer is not evidence that a retrieval-augmented generation system is correct. Good evaluation decomposes the workflow into components and tests the user-visible outcome.
Start with the retrieval question
Measure whether the retriever finds relevant supporting material for a query. A small, versioned dataset with known source documents can support recall@k and precision@k. The correct retrieval cutoff depends on available context and the domain.
Then evaluate grounded generation
Separate factual correctness, citation support, and response completeness. An answer can be factually plausible but unsupported by the retrieved documents. Include unanswerable questions and check whether the system abstains instead of inventing citations.
Test authorization independently
Retrieval must respect tenant, role, and document boundaries before the model sees any content. Authorization failures should be reported as security defects, not combined into a general answer-quality score.
Evaluate operations
Measure p50 and p95 latency, indexing freshness, failure rates, token usage, and the impact of external dependency errors. Break these down by query type. A single aggregate success rate can hide severe failures for certain users or document categories.
A repeatable evaluation loop
- Curate representative questions and cite expected source documents.
- Split development and regression sets to avoid tuning to every benchmark case.
- Record retrieved document identifiers and model output for each run.
- Score retrieval, grounding, and task completion separately.
- Review failure categories, not just mean scores.
- Gate releases on explicit regressions and investigate significant distribution shifts.
LLM-as-judge can help triage large evaluation sets, but judge agreement and bias should be checked against human-reviewed examples before trusting it as the only metric.
Make the score useful to engineers
Instead of publishing an unsupported “95% accurate” number, document dataset size, query distribution, scoring rubric, baseline, and uncertainty. Include representative failures and what changed between versions.
The goal is not a perfect leaderboard score. It is a system that remains trustworthy as source documents, models, and user needs change.