# RAG evaluation

> RAG Evaluation: What to Measure and How. Canonical page: <https://zapple.tech/glossary/rag-evaluation/>

RAG evaluation measures a retrieval-augmented generation system in two parts: whether the search step returned the right passages, and whether the answer built from them is supported and useful. Scoring the two separately tells you which one to fix. You need a labelled question set before any score means something.

## What does RAG evaluation measure?

A RAG system has two steps. Search finds passages in your documents. A model then writes an answer from them. The term comes from Lewis et al., whose [2020 paper on retrieval-augmented generation](https://arxiv.org/abs/2005.11401) named the approach. Evaluation scores each step on its own.

| Step | Measure | What a low score tells you to fix |
|:--|:--|:--|
| Retrieval | Did the right passages come back? | Chunking, the search index, the embedding model |
| Retrieval | Were they near the top, in the right order? | Ranking and filters |
| Answer | Is each claim supported by a retrieved passage? | The prompt, or a model that adds facts of its own |
| Answer | Does it answer the question that was asked? | The prompt and the answer format |
| Answer | What happens when the documents hold no answer? | Refusal behavior |

The last column is our judgement from practice on where to look first. The tools below define the measures, not the fixes.

The [TruLens documentation](https://www.trulens.org/getting_started/core_concepts/rag_triad/) calls the core of this the RAG triad: "context relevance, groundedness and answer relevance." The [Ragas documentation](https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/) lists context precision, context recall, response relevancy and faithfulness for the same job.

## Is the problem in retrieval or in the answer?

Look at the passages before you look at the answer. If the right passage never came back, no prompt change will help. If it did come back and the answer ignores or contradicts it, search is fine and the generation step needs work.

The [LlamaIndex documentation](https://developers.llamaindex.ai/python/framework/module_guides/evaluating/) makes the same split. It separates response evaluation from retrieval evaluation, and asks of the latter: "Are the retrieved sources relevant to the query?" Microsoft's [RAG evaluators](https://learn.microsoft.com/en-us/azure/foundry/concepts/evaluation-evaluators/rag-evaluators) draw the line on labels. Its document retrieval evaluator suits teams that "have query relevance labels (ground truth)", while its retrieval evaluator is for when "you don't have ground truths" and uses a judge model to rate how relevant the chunks are.

That is the practical rule. With labels you can measure search directly. Without them you are asking a model to grade the search, and you inherit its errors.

## What do you need before you can evaluate a RAG system?

Three things, before any tool:

- **A labelled question set.** Real questions from users or support, each with the passage or answer that is correct. Keep it separate from the examples used to tune the system.
- **An owner.** Someone who adds new questions when users find failures and removes ones that no longer apply.
- **An agreed threshold.** The product owner decides what score is good enough to ship, before the first run, not after.

If you want outside help with an AI feature, see our [AI testing](/services/ai-testing/) service. For a conversational product, the step-by-step view is in our guide to [automating a chatbot test](/blog/types-of-automation-testing/how-do-you-automate-a-chatbot-test/).

## What does RAG evaluation not solve?

Scores depend on the question set. A system can score well on questions you thought of and fail on the ones users ask. A judge-scored metric inherits the judge's errors, so check a sample of its verdicts by hand. And a good offline score says nothing about documents that change after the test, so rerun the set when the content changes. Related risks for agents are covered in how to [test AI agents](/blog/types-of-automation-testing/how-to-test-ai-agents/) and how to [test an MCP server](/blog/types-of-automation-testing/how-to-test-mcp-server/), and whether this work replaces testers in [will AI replace software testers](/blog/qa-engineers/will-ai-replace-software-testers/).

## What does Zapple.Tech do about it?

If you are not sure where your RAG system stands, start with the evidence. Zapple.Tech starts with a one-week QA audit of one product area. It looks at its tests, pipeline and release process, and ends in a written report on what is at risk and what to fix first, plus a pilot plan you can run with Zapple.Tech or without it. Read more on the [QA audit and assessment](/services/audit-and-assessment/) page.

Tell us about your RAG system in the form below.

## FAQ

### What is RAG evaluation?

RAG evaluation is the measurement of a retrieval-augmented generation system. It scores the retrieval step, which finds passages in your documents, and the generation step, which writes an answer from them. Scoring both separately shows whether a bad answer came from missing context or from how the model used it.

### Which metrics are used to evaluate RAG?

Retrieval metrics ask whether the right passages came back and in what order. Answer metrics ask whether each claim is supported by the retrieved passages and whether the answer addresses the question. TruLens names these context relevance, groundedness and answer relevance. Ragas and Microsoft's evaluators use other names for the same checks, such as faithfulness and relevance.

### What is the difference between retrieval metrics and answer metrics?

Retrieval metrics judge the search step, and some need labels saying which passages are correct. Answer metrics judge the written response against the retrieved text and the question, and are often scored by a judge model. A low retrieval score points to search and indexing. A low answer score with good retrieval points to the prompt or the model.

### Can a RAG system pass evaluation and still give wrong answers?

Yes. Scores depend on the question set, so questions you did not include are not covered. Judge-scored metrics carry the judge's own errors. And documents that change after the test can break answers that scored well on the day.

## Sources

- [Microsoft Learn, Retrieval-Augmented Generation (RAG) evaluators for generative AI (ms.date 2026-06-02, updated 2026-11-24)](https://learn.microsoft.com/en-us/azure/foundry/concepts/evaluation-evaluators/rag-evaluators)
- [TruLens documentation, The RAG triad (current docs)](https://www.trulens.org/getting_started/core_concepts/rag_triad/)
- [LlamaIndex documentation, Evaluating (current docs)](https://developers.llamaindex.ai/python/framework/module_guides/evaluating/)
- [Ragas documentation, Available metrics (current docs)](https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/)
- [Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (arXiv:2005.11401, submitted 2020-05-22; originator of the term)](https://arxiv.org/abs/2005.11401)
