A RAG application can retrieve documents successfully and still generate an incorrect answer. It can also produce a relevant response while missing important information from the retrieved sources.
This makes evaluating RAG systems more complicated than checking whether an LLM produces a good-looking response.
Developers need to measure two things separately: whether the system retrieves the right information and whether the LLM uses that information correctly.
RAG evaluation metrics help identify these problems. Metrics such as faithfulness, relevance, recall, and groundedness provide different signals about the quality of a retrieval and generation pipeline.
Understanding what each metric measures is important when building reliable AI applications.
1. Faithfulness: Is the Answer Supported by Retrieved Context?
Faithfulness measures whether the claims in an LLM-generated answer can be supported by the retrieved context.
Consider a company knowledge base containing this policy:
"Employees can request a refund within 14 days of purchase."
A user asks:
"When can I request a refund?"
The RAG application retrieves the correct policy, but the LLM responds:
"You can request a refund within 30 days of purchase."
The answer addresses the question, but its main claim contradicts the retrieved information.
This is a faithfulness problem.
A common approach to calculating faithfulness involves three steps:
- Extract individual factual claims from the generated response.
- Check whether each claim can be supported by the retrieved context.
- Calculate the proportion of supported claims.
The simplified formula is:
[ Faithfulness = \frac{\text{Supported claims}}{\text{Total claims}} ]
For example, if an answer contains four factual claims and only three are supported by the retrieved context, its faithfulness score is 0.75.
When to use it: Evaluate faithfulness when you want to detect unsupported statements, hallucinations, or incorrect interpretations of retrieved information.
One important distinction: faithfulness measures consistency with the supplied context, not whether the source document itself is factually correct. An outdated document can still produce a highly faithful answer.
2. Relevance: Does the Answer Address the Question?
A response can be factually supported and still fail to answer what the user asked.
Imagine someone asks:
"How do I reduce database query latency?"
The RAG system retrieves relevant documentation about database indexing and connection pooling.
However, the LLM responds with a general explanation of how relational databases work.
The response may contain correct information, but it does not directly address the user's question.
This is an answer relevance problem.
Answer relevance measures how closely the generated response matches the intent of the original question.
It generally considers whether the answer:
- Directly addresses the question.
- Includes the information the user requested.
- Avoids unnecessary explanations.
- Provides an appropriately focused response.
Some evaluation frameworks, including Ragas, estimate answer relevance by generating possible questions from the response and comparing them semantically with the original query.
There is also a separate concept called context relevance. It evaluates whether the retrieved documents are useful for answering the question.
These should not be confused:
- Answer relevance: Does the generated response address the question?
- Context relevance: Does the retrieved information help answer the question?
When to use it: Measure answer relevance when you want to identify generic, incomplete, or off-topic responses. Use context relevance when investigating retrieval quality.
3. Recall: Did Retrieval Find All the Important Information?
Recall is primarily concerned with missing relevant information.
A RAG retriever might return several documents that appear useful but miss the one passage containing the actual answer.
For example, a user asks:
"What are the refund period and approval requirements for late requests?"
The knowledge base contains two relevant passages:
- Refund requests must be submitted within 14 days.
- Requests submitted after 14 days require manager approval.
Suppose the retriever finds the first passage but misses the second.
The retrieved context contains useful information, but it is incomplete.
This is a retrieval recall problem.
Context Recall measures how much of the information required to answer a question is represented in the retrieved context.
A simplified claim-based formula is:
[ Context\ Recall = \frac{\text{Reference claims supported by retrieved context}} {\text{Total reference claims}} ]
In this example, one of the two required claims was retrieved, producing a context recall score of 0.5.
Another related metric is Recall@K, which measures how many relevant documents appear within the top K search results.
These metrics are related but not identical:
- Context Recall evaluates whether the retrieved information covers the required answer.
- Recall@K evaluates whether relevant documents appear within a specified retrieval cutoff.
When to use it: Use context recall when important facts are missing from the retrieved evidence. Use Recall@K when benchmarking the retriever's search performance against labelled relevant documents.
A useful companion metric is Context Precision, which measures whether relevant chunks are ranked above irrelevant ones. High recall with poor precision can mean the retriever finds the necessary information but also returns too much unrelated content.
4. Groundedness: Is the Response Grounded in Its Evidence?
Groundedness evaluates whether an AI-generated response is supported by the information supplied to the model.
Imagine an internal company assistant retrieves a policy stating that employees receive 20 annual leave days.
The model responds:
"Employees receive 20 annual leave days, and unused days automatically carry forward to the next year."
The first statement is supported by the retrieved policy. The second is not.
The response therefore includes information that cannot be established from the supplied evidence.
Groundedness helps identify these unsupported additions.
A useful distinction is that faithfulness and groundedness are closely related concepts. Microsoft documentation explicitly describes groundedness as sometimes being called faithfulness. Other frameworks expose separate metric names or use different evaluation definitions.
For practical evaluation, treat them as a shared evidence-consistency dimension unless your chosen framework defines them differently.
Also remember that groundedness does not guarantee completeness. An answer can contain only supported claims while omitting an important part of the user's question.
When to use it: Use groundedness to assess whether generated responses stay within the evidence provided by retrieval, particularly in applications involving company policies, technical documentation, and factual support.
5. Understanding the Metrics Together
These metrics become more useful when evaluated together.
| Metric | What it evaluates | Main problem detected |
|---|---|---|
| Faithfulness | Generated claims against retrieved context | Unsupported claims |
| Answer Relevance | Response against user query | Off-topic or incomplete answers |
| Context Recall | Retrieved context against expected information | Missing evidence |
| Groundedness | Response against supplied evidence | Unsupported generation |
Consider the earlier refund example.
The RAG system retrieves the correct 14-day policy, but the model answers with 30 days.
Its evaluation might look like this:
- Context Recall: High, because the required policy was retrieved.
- Answer Relevance: High, because the response addresses the refund question.
- Faithfulness: Low, because the answer contradicts the retrieved context.
- Groundedness: Low, because the response is not supported by its evidence.
This is why a single overall RAG accuracy score is rarely enough to diagnose system behaviour.
6. How to Build a RAG Evaluation Workflow
Understanding metrics is only useful when you can apply them consistently.
A practical evaluation workflow can be built around five steps.
Step 1: Create an evaluation dataset
Collect representative questions from real application usage.
For each question, store:
- The user query.
- The expected answer or reference answer.
- Relevant reference documents or passages, when available.
- The retrieved context.
- The generated response.
Include different query types, such as exact factual questions, paraphrased questions, multi-part questions, and questions that cannot be answered from the available documents.
Ragas also supports generating test datasets from your own documents, but generated examples should be reviewed before becoming evaluation ground truth.
Step 2: Run the complete RAG pipeline
Execute the evaluation questions against your existing application.
Capture retrieval results, model responses, and the context actually supplied to the LLM.
Keep the test configuration consistent so that changes in scores can be traced to actual system modifications.
Step 3: Evaluate retrieval and generation separately
Start with context recall and context precision to understand whether retrieval is finding useful evidence.
Then evaluate faithfulness, groundedness, and answer relevance to understand how the model uses that evidence.
This separation helps identify whether a problem belongs to document retrieval or response generation.
Step 4: Investigate low-scoring examples
Do not stop at average metric scores.
Inspect individual failures.
Low context recall may indicate poor chunking, embedding quality, or search configuration. Low context precision may indicate irrelevant retrieval results. Low faithfulness may indicate that the model is adding unsupported information.
A metric should help identify what to investigate next, not simply report that the system performed poorly.
Step 5: Repeat evaluation after every meaningful change
Run the same evaluation dataset after changing your embedding model, chunking strategy, retrieval settings, reranker, or generation prompt.
Compare the results against the previous baseline.
This helps identify improvements as well as regressions before deploying changes to production.
7. Tools for RAG Evaluation
Several tools provide evaluation metrics and workflows for RAG applications.
Ragas: Offers metrics including faithfulness, context recall, context precision, and answer relevancy. It is useful when building a dedicated RAG evaluation pipeline.
Microsoft Foundry: Provides retrieval and response evaluators for groundedness, relevance, and document retrieval, among other dimensions.
MLflow: Supports evaluation and tracking workflows for LLM applications, making it useful for comparing experiments and monitoring changes.
These tools do not eliminate the need for human review. LLM-based evaluators can produce inconsistent or biased judgments, especially when evaluating specialised terminology or subtle factual distinctions.
For important applications, compare automated evaluation results against human-reviewed examples and validate whether the evaluator agrees with your intended quality criteria.
Conclusion
Evaluating a RAG application requires more than checking whether its final response sounds correct.
Faithfulness and groundedness help determine whether the answer is supported by retrieved evidence. Relevance measures whether the response addresses the user's intent, while recall checks whether the retrieval system found the information needed to answer.
Together, these metrics provide a more useful picture of RAG quality and help developers identify where improvements are needed.
A reliable RAG system is not simply one that generates good answers. It is one that retrieves the right evidence, uses it correctly, and answers what the user actually asked.



