Measuring RAG Quality: Grounding, Faithfulness, and Retrieval Metrics

RAG systems fail in ways that a single quality number cannot see, because RAG has two stages that fail differently, and measuring the system’s quality as one thing hides which stage is failing. A RAG system retrieves information and then generates an answer from it, and the retrieval can fail by fetching the wrong information while the generation faithfully uses it, or the generation can fail by ignoring correctly retrieved information, and these are different failures that a single quality metric conflates. Measuring RAG quality requires measuring the stages separately, the retrieval quality and the generation’s grounding and faithfulness, because a RAG system’s failures live in distinct stages and measuring them together tells you the system is failing without telling you where. Separating the metrics by stage is what lets you diagnose and fix RAG failures rather than knowing only that they occur.

Agentic AI 15 January 2025

If you operate a RAG system, the quality measurement determines whether you can diagnose its failures, and a single quality number tells you the system is failing without telling you whether the retrieval or the generation is at fault, which are different problems with different fixes. The retrieval quality and the generation quality are distinct, and measuring them separately is what lets you see which stage is failing and fix it, where a single metric conflates them and leaves you unable to diagnose. Understanding the stage-specific RAG metrics and what each measures is what lets you measure RAG quality in a way that diagnoses failures rather than just detecting them.

Why a single RAG metric hides the failure

Illustration: Why a single RAG metric hides the failure

A RAG system has two stages, retrieval and generation, and they fail differently, which means a single quality metric measuring the system’s overall output conflates two distinct failure modes. The retrieval stage can fail by fetching the wrong information, information that is irrelevant, incomplete, or does not contain the answer, and if the retrieval fails, the generation working from bad information produces a bad answer, but the failure is in the retrieval. The generation stage can fail by producing a bad answer from good information, ignoring or misusing correctly retrieved information, and if the generation fails, the answer is bad despite good retrieval. These are different failures, and a single metric measuring the answer’s quality sees that the answer is bad without seeing which stage caused it.

This conflation matters because the two failures have different fixes, and not knowing which stage is failing means not knowing what to fix. A retrieval failure is fixed by improving the retrieval, and a generation failure is fixed by improving the generation, and a single quality metric that tells you the answer is bad without telling you whether the retrieval or the generation is at fault leaves you unable to target the fix. This is the component-versus-outcome distinction applied within RAG, where the outcome metric tells you the system is failing and the stage metrics tell you where, and diagnosing the failure requires the stage metrics. A single RAG metric hides the failure by conflating the retrieval and generation stages, telling you the system is failing without telling you which stage is at fault, which is why measuring RAG quality requires separating the metrics by stage.

The stage-specific metrics

Measuring RAG quality by stage means measuring the retrieval quality and the generation’s grounding and faithfulness separately, so each stage’s quality is visible. Retrieval quality measures whether the retrieval fetched the right information, whether the retrieved information is relevant and contains what is needed to answer, which assesses the retrieval stage independently of what the generation does with the information. Measuring retrieval quality tells you whether the retrieval is doing its job, fetching the right information, so a retrieval failure is visible as poor retrieval quality regardless of the final answer, which lets you see when the retrieval is the problem.

Grounding and faithfulness measure the generation stage: whether the generated answer is grounded in the retrieved information, based on what was retrieved rather than on the model’s parametric memory or fabrication, and faithful to it, accurately representing the retrieved information rather than distorting it. Grounding measures whether the answer comes from the retrieved information, and faithfulness measures whether it represents that information accurately, and together they assess whether the generation is doing its job, producing an answer grounded in and faithful to the retrieved information. A generation failure is visible as poor grounding or faithfulness, the answer not based on or not accurately representing the retrieved information, which lets you see when the generation is the problem even when the retrieval was good. This connects to the hallucination constraints, where grounding is the constraint that keeps the answer based on reliable information, measured here as a RAG quality metric. The stage-specific metrics, retrieval quality for the retrieval and grounding and faithfulness for the generation, measure each stage separately, which is what makes the failing stage visible.

The trade-off, and measuring stages to diagnose

Measuring RAG quality by stage costs more than a single metric, and naming that trade-off keeps the measurement matched to the need. Measuring the retrieval quality and the generation’s grounding and faithfulness separately is more measurement than a single answer-quality metric, requiring the stage-specific evaluation and often the judge to assess grounding and faithfulness, which is more effort than measuring the answer alone. This cost is justified because the stage-specific metrics diagnose the failure, telling you which stage to fix, where the single metric only detects the failure, and the diagnosis is what lets you improve the RAG system by targeting the failing stage rather than guessing.

The deeper point is that the stage metrics enable the targeted improvement that a single metric does not, because knowing which stage is failing tells you where to focus. A RAG system with poor retrieval quality needs retrieval improvement, better retrieval, hybrid search, or a knowledge graph for the queries the current retrieval misses, and a RAG system with poor grounding or faithfulness needs generation improvement, and the stage metrics tell you which. Measuring the stages separately is what lets you diagnose and target the fix, and the cost of the stage-specific measurement is justified by the targeted improvement it enables, where a single metric leaves you improving blindly. The trade-off is between the effort of stage-specific measurement and the diagnosis it provides, and measuring the stages separately to diagnose the failing stage is what makes RAG quality measurement actionable rather than just detective. Measuring the stages separately, to diagnose which stage is failing and target the fix, is what makes RAG quality measurement improve the system.

Illustration: The trade-off, and measuring stages to diagnose

Where it almost broke

We operated a RAG system measured by a single answer-quality metric, which told us the system was producing bad answers on some queries without telling us why, and we were unable to diagnose whether the retrieval was fetching the wrong information or the generation was mishandling good information, because the single metric conflated the two stages. We were left improving blindly, unsure whether to focus on the retrieval or the generation, because the metric detected the failures without diagnosing them, and our attempts to improve the system were guesses at which stage was at fault.

The correction measured the stages separately. We measured the retrieval quality, whether the retrieval was fetching relevant information containing the answer, and the generation’s grounding and faithfulness, whether the answer was based on and accurate to the retrieved information, separately, which made the failing stage visible. The stage metrics revealed that the failures were concentrated in the retrieval, which was fetching incomplete information on certain queries, while the generation was faithfully using what it got, so the fix was retrieval improvement, which we targeted rather than guessing. The RAG system improved because we could diagnose which stage was failing and target the fix, where the single metric had left us improving blindly. The lesson was that RAG fails in distinct stages and a single metric conflates them, and measuring the retrieval quality and the generation’s grounding and faithfulness separately is what diagnoses the failing stage and enables the targeted fix.

Measure each stage to find the failing one

The reframe that makes RAG quality measurement actionable is measuring the retrieval and generation stages separately, so the failing stage is visible and the fix can be targeted. Measuring RAG quality requires retrieval quality for the retrieval stage and grounding and faithfulness for the generation stage, because RAG fails in distinct stages and a single metric conflates them, detecting failure without diagnosing it. Knowing the system is failing without knowing which stage is at fault leaves you improving blindly.

The teams that improve their RAG systems are the ones that measured the stages separately, saw whether the retrieval or the generation was failing, and targeted the fix at the failing stage. A single quality metric tells you the answer is bad without telling you whether the retrieval fetched the wrong information or the generation mishandled the right information, which are different problems with different fixes. Measuring each stage to find the failing one, the retrieval quality and the generation’s grounding and faithfulness, is what turns RAG quality measurement from detecting failures into diagnosing them, which is what lets you fix the stage that is actually failing rather than guessing.

Related: Agentic AI

Tell us the number you need to move.

…outcomes that survive scrutiny.