RAG Evaluation: Score the Pipeline, Not Just the Answer
RAG evaluation splits into retriever and generator metrics. See which metrics matter, how to build eval sets from traces, and why RAG breaks quietly.
RAG evaluation measures a retrieval-augmented pipeline in two places: whether the retriever found the right context, and whether the generator answered faithfully from it. The metric taxonomy is well established and every major toolkit implements it. What the standard guides undersell is what happens after launch, where retrieval quality decays silently while answers keep sounding fluent. This page covers the metrics, the judge noise hiding inside them, and the production failure data the tutorials skip.
What Does RAG Evaluation Actually Measure?
A RAG pipeline is two systems glued together, and each fails independently. Perfect retrieval is wasted if the model ignores the context. A perfect generator confabulates if retrieval hands it the wrong documents. So a useful rag eval scores the components separately, then confirms the whole.
| Layer | Metric | Question it answers |
|---|---|---|
| Retriever | Contextual recall | Did we retrieve everything needed for the ideal answer? |
| Retriever | Contextual precision | Do relevant chunks outrank irrelevant ones? |
| Retriever | Contextual relevancy | How much of what we retrieved is on-topic? |
| Generator | Faithfulness | Does the answer stick to the retrieved context? |
| Generator | Answer relevancy | Does the answer address the question? |
| End to end | Correctness | Does the answer match a gold reference? |
The component split is what makes the eval actionable. High retrieval scores with a low faithfulness score point at the prompt or the model. Low contextual recall points at chunking, embeddings, or the index. An end-to-end number alone tells you something is wrong and nothing about where.
A worked example makes the attribution concrete. A support bot starts answering pricing questions with last quarter’s numbers. End-to-end correctness has dropped, so the first instinct is to blame the model. The component scores say otherwise: faithfulness is high, because the answers accurately reflect the retrieved chunks, while contextual recall has fallen, because the chunks are stale. The fix is a reindex, not a prompt change, and without the split the team would have spent a week tuning the wrong stage. That triage pattern is the core skill of rag evaluation, and it only exists when both layers are scored.
Which RAG Benchmarks and Tools Exist?
The RAGAS toolkit is the reference implementation most teams start with, and its metric names became the shared vocabulary of the field. Observability platforms ship the same metrics as built-in scorers, and public rag benchmarks exist for retrieval-oriented question answering. For tool selection the differences matter less than one shared property, because almost every generator-side metric in every tool is scored by an LLM judge.
That property has a consequence the tutorials rarely state. Judge-scored metrics carry judge noise. Re-score an identical output set three times with the same judge and the scores disagree, so a faithfulness score that moved a point or two after your chunking change may have measured nothing but re-evaluation variance. The mechanics and mitigations live in our LLM evals guide, and they apply to every rag evaluation number you produce.
Choosing among rag tools is mostly a question of where the scores should live. A library like RAGAS fits a team that wants the eval inside its own test suite and CI. Platform scorers fit teams that want eval results joined to traces and dashboards without glue code. Agentic RAG adds one more layer, since a pipeline where an agent decides when and what to retrieve also needs its retrieval decisions judged, not just its retrieval results. In every case the metrics are the same taxonomy, which is why learning the taxonomy beats learning any single tool.
Why Does Production RAG Break Quietly?
RAG failures in production rarely announce themselves. The pipeline returns an answer either way, and the answer sounds confident whether or not the retrieval behind it held up. Fragile retrieval is one of the most common infrastructure failure clusters builders report, and Mutagent’s community-research methodology covers how those quiet failures were catalogued from real forum reports.
The recurring quiet failures share a shape. The corpus goes stale while the index keeps serving old chunks. An embedding model gets upgraded and the vector space shifts under existing documents. A chunking change truncates the passages that used to carry the answer. Query patterns drift until the questions users ask no longer match the questions the eval set contains. None of these throw an error. All of them show up as a slow slide in contextual recall, which is why the retriever metrics, not the end-to-end score, are your early warning system.
Drift detection turns that insight into practice. Keep a small fixed probe set of queries whose correct chunks are known, and run just the retriever against it daily, comparing which documents come back and at what rank. The probe run costs almost nothing, since no generation and no judge are involved, and it converts every silent failure above into a visible diff. A reindex that drops recall on the probes gets caught the morning it happens, with the diff pointing at the documents that vanished, instead of surfacing three weeks later as a vague rise in bad-answer reports that no rag evaluation suite was positioned to explain.
How Do You Build a RAG Eval Set From Real Traces?
Synthetic question sets check that the pipeline works in general. Eval sets built from real traffic check that it works for your users, and they are the only kind that captures drift. The build loop is straightforward once tracing is in place, since each trace already records the query, the retrieved chunks with scores, and the answer.
- Sample traces weekly, oversampling user-flagged and low-rated answers.
- Label the failures by component, using retrieval scores to decide whether the miss happened before or after generation.
- Promote recurring failures into the golden set with a gold answer and the minimal context that supports it.
- Re-run the suite on every corpus update, model swap, or chunking change, and compare against the stored baseline.
Keep the golden set small enough to run on every change. A few hundred well-labeled items catch more regressions than ten thousand synthetic ones, and they keep judge costs low enough that nobody is tempted to skip the run.
Composition matters as much as size. A useful golden set mirrors the query distribution rather than the corpus: heavy on the question types users ask daily, salted with the edge cases that caused past incidents, and refreshed whenever the traffic mix shifts. Include a slice of unanswerable questions too, queries whose answer is not in the corpus at all, because how the pipeline behaves when retrieval legitimately finds nothing is one of the most user-visible qualities a rag eval can measure and one the standard metrics skip entirely.
What Does a Complete RAG Evaluation Workflow Look Like?
Assembled end to end, the loop has a definite shape. Offline, the golden set runs on every deliberate change, with retriever and generator scored separately and the delta compared against a stored baseline. The gate uses your measured judge noise as its threshold, so a faithfulness change smaller than the noise band neither blocks nor celebrates anything. Online, a sampled slice of production traffic gets the same scoring on a schedule, which is what catches the drift that no code change triggered.
The two halves feed each other. Online sampling surfaces new failure shapes, those failures become labeled golden-set items, and the growing golden set makes the offline gate stricter exactly where production proved it mattered. Teams that run only the offline half go stale. Teams that run only the online half detect regressions after users do. The loop is the product, and rag evaluation done this way turns from a launch checklist item into the instrument panel the pipeline is flown on.
When Is RAG Evaluation Overkill?
A full metric suite is not always the right first move. If the corpus is a handful of documents, retrieval rarely fails, and deterministic tests on the generator will catch most regressions at zero judge cost. If the pipeline has no traces yet, instrument it before evaluating it, since eval sets built without production data go stale in weeks. And if scores are already high and stable, invest in monitoring that samples live traffic rather than growing the offline suite.
The signal to expand the eval instead: answers that sound right but cite the wrong source, recall metrics drifting down across releases, or a corpus that updates faster than the golden set. Any one of those on its own justifies the full two-layer suite, because each is a component failure that an end-to-end spot check will misattribute, and misattributed failures are how weeks get spent tuning the wrong stage. Mutagent’s agents build and maintain this loop directly from your traces, from eval-set construction to regression gating on calibrated judges.
Frequently Asked Questions
How do you evaluate a RAG pipeline?
Evaluate the two components separately before scoring end to end. Retriever metrics like contextual recall and precision tell you whether the right chunks were found. Generator metrics like faithfulness and answer relevancy tell you whether the model used them honestly. The split matters because an end-to-end score cannot tell you which half to fix.
What is RAGAS?
RAGAS is an open source toolkit that became the reference implementation for RAG evaluation metrics. It scores pipelines on faithfulness, answer relevancy, contextual precision, and contextual recall, mostly using LLM judges rather than string overlap. It standardized the vocabulary most teams and vendors now use, so a ragas evaluation is often the first eval a RAG team runs.
What metrics are used for RAG evaluation?
Retriever metrics measure whether the relevant chunks were retrieved and ranked well, chiefly contextual recall, contextual precision, and contextual relevancy. Generator metrics measure the answer itself, chiefly faithfulness to the retrieved context and answer relevancy to the question. End-to-end correctness against a gold answer sits on top of both.
How often should you re-run RAG evals?
On every deliberate change and on a schedule between them. Re-run when the corpus updates, when you swap embedding or generation models, and when chunking changes. Between releases, score a sample of live traffic weekly, because retrieval quality drifts as content and queries evolve even when the code does not change at all.