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 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 calls the core of this the RAG triad: “context relevance, groundedness and answer relevance.” The Ragas documentation 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 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 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 service. For a conversational product, the step-by-step view is in our guide to automating 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 and how to test an MCP server, and whether this work replaces testers in 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 page.
Tell us about your RAG system in the form below.
How does RAG evaluation relate to other terms?
- AI testing
AI testing is the testing of software that uses machine learning or large language models, whose outputs vary and cannot always be checked against one fixed answer. Our AI testing services build an evaluation dataset for your AI feature, a baseline of how it behaves today, and checks that run in your CI.
- LLM evaluation
LLM evaluation is the practice of measuring how a language-model feature or agent behaves on a defined set of tasks, using written success criteria and scores. It does not by itself show the feature is correct. Our AI agent testing builds a task set, a measured baseline and a suite that scores each model, prompt or tool change.
- LLM as a judge
LLM as a judge means using one language model to grade the output of another against a rubric, so a team can score thousands of answers unread by people. It is fast and flexible, but the judge makes its own errors. Trust its score only after you compare it with human labels, and check hard rules without a model.
- Test harness
A test harness is everything around the code under test that lets you run it and judge the result: the driver that calls it, stand-ins for its dependencies, the test data, the runner and the reporting. You pay for one whenever tests need more than the product itself. An AI agent needs one that also contains its side effects.
Sources
- Microsoft Learn, Retrieval-Augmented Generation (RAG) evaluators for generative AI (ms.date 2026-06-02, updated 2026-11-24) (read 5 December 2026)
- TruLens documentation, The RAG triad (current docs) (read 5 December 2026)
- LlamaIndex documentation, Evaluating (current docs) (read 5 December 2026)
- Ragas documentation, Available metrics (current docs) (read 5 December 2026)
- Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (arXiv:2005.11401, submitted 2020-05-22; originator of the term) (read 5 December 2026)