TECHNOLOGY

Ragas context precision, recall and faithfulness measure different failures

In this article
THE QUICK TAKE

An answer can be faithful to retrieved context while remaining incomplete because a necessary passage was never retrieved.

Ragas context precision, context recall and faithfulness answer different questions about a RAG pipeline. Keeping them separate prevents a faithful but incomplete answer from being mistaken for successful retrieval, or a relevant retrieved passage from being mistaken for a grounded final response.

Define the object being evaluated

The Ragas metric catalog separates metric families and their required inputs. Retrieval metrics inspect context selection against a defined target; faithfulness inspects whether answer claims are supported by supplied context. Exact inputs vary across metric variants. Select the implementation first, then build the evaluation record it requires instead of assuming every metric accepts the same question, answer and reference fields.

Construct a question with complementary evidence

Suppose a maintenance question asks which inspection is required and when it must occur. One passage names the inspection; another supplies the interval. Retrieving only the first passage can support a faithful partial answer while omitting a necessary part of the task. Retrieving both passages does not prevent the generator from inventing an unsupported interval.

Observed behaviorMain diagnostic question
Irrelevant passages appear earlyIs context precision weak?
Required interval passage is missingIs evidence coverage incomplete?
Answer invents an intervalIs the answer unsupported?
Answer quotes only the inspectionIs a faithful answer nevertheless incomplete?

Keep retrieval and generation interventions separate

The original Ragas paper motivates component-oriented evaluation. First freeze the question and context while changing the generator. Then freeze the generator while comparing retrieved context sets. Changing both together obscures whether a better answer came from improved evidence or different generation behavior. Preserve passage order because ordering can affect the downstream answer even when the passage set is unchanged.

Supply references appropriate to the metric

A reference answer, a reference passage and a relevance judgment are different artifacts. An answer written from incomplete source material cannot establish complete retrieval. Likewise, a trusted reference answer may use information absent from the supplied context. Keep their provenance and revision so an unexpected score can be investigated rather than treated as an unquestionable judgment about the application.

Audit automated judgments

The primary Ragas implementation is version-sensitive and may use model-based judgments depending on the metric. Save evaluator configuration and inspect disagreements on a small manually reviewed sample. A fluent evaluator explanation can still misread a technical negation or confuse product revisions. Numerical scores summarize that evaluation process; they do not remove uncertainty in its reference material or judge.

Report a failure profile

Present retrieval precision, evidence coverage and answer support as distinct dimensions, with concrete examples. Include a case where retrieval succeeds but generation fails and another where generation remains faithful to insufficient evidence. This profile points to different corrections: candidate selection, retrieval coverage, prompt behavior or source quality. An undifferentiated average cannot identify which of those mechanisms requires attention.

Related reading: A local RAG server: placing components around the GPU; Evaluating embeddings for Russian language retrieval.

← All articles