RAG Evaluation: How to Tell If Your AI Answers Are Actually Good

A RAG pipeline can look great in a demo and still give wrong answers in production. The only way to know is to measure it, and that is what rag evaluation metrics are for. They turn vague feelings like “the answers seem fine” into numbers you can track, compare, and improve. This guide covers the checks that matter, how to run them by hand, and when to bring in automated tools or human reviewers.

What “Good” Means for a RAG Answer

A good RAG answer has three traits. First, it is grounded: every claim can be traced back to a retrieved document. Second, it is complete: it answers the whole question, not just the easy half. Third, it is useful: it reads like an answer, not a copy-paste of source text.

These three traits map to three things you should measure: faithfulness, answer relevance, and context recall. Faithfulness asks whether the answer stays true to the retrieved passages. Answer relevance asks whether the answer matches the question asked. Context recall asks whether retrieval found the passages the question needed.

RAG Evaluation Metrics You Can Actually Measure

You do not need a research lab to start. These four checks cover most real-world problems, and each one can be scored by hand on a small sample.

Faithfulness

Break the answer into individual claims. For each claim, check whether the retrieved passages support it. Score the answer as the share of claims that are supported. An answer with five claims and one unsupported claim scores 0.8. This is the single most useful number for catching hallucinations.

Answer relevance

Read the question, then read the answer. Does it answer the question that was asked, or a nearby question? A common failure is an answer that is true and grounded but ignores the actual request, for example by listing general facts when the user asked for a specific number.

Context recall

For each test question, note which source passages hold the answer. Then check whether retrieval returned those passages. If the right passage never reached the model, the model had no chance. This metric points at your retriever and your chunking strategy, not at the model.

Context precision

Of the passages retrieved, how many were actually needed? A retriever that returns ten passages when two would do wastes tokens and can confuse the model with noise. High precision matters most when you pay per token or work with a small context window.

How to Evaluate RAG Systems by Hand

To evaluate rag systems without any tooling, you need a test set. Build 30 to 50 questions that reflect what real users ask, and write down the correct answer for each, plus the source document it comes from. Keep the questions varied: some fact lookups, some summaries, some comparisons, and a few questions with no answer in your documents. That last group matters, because a good system should say it does not know instead of inventing an answer.

Run each question through the pipeline and grade the answers on a simple 0, 1, or 2 scale for faithfulness and relevance. Two people grading the same answers independently will disagree sometimes, and that disagreement is useful: it shows which questions are unclear or which grading rules need sharpening.

Automated Scoring With RAGAS Metrics

When hand grading gets too slow, automated frameworks can score hundreds of answers in minutes. The best known is RAGAS, an open-source library built for this job. Its ragas metrics cover the same ideas as the manual checks above: faithfulness, answer relevancy, context precision, and context recall, each scored by a model acting as a judge.

RAGAS works well as a regression check. Run it on a fixed test set before and after a change to your retriever, your prompts, or your model, and compare the scores. A drop in faithfulness after a prompt change tells you the change hurt, even if the answers still read well.

Automated scores are not ground truth. The judge model has its own biases, and it can miss errors that a human would catch. Treat the numbers as a signal to investigate, not as a final verdict. If you want a deeper comparison of the tooling around this, our guide on how to evaluate RAG systems with RAGAS metrics walks through setup and interpretation in more detail.

Build a Test Set That Finds Real Problems

A test set built only from easy questions will flatter your system. Mix in hard cases on purpose:

  • Questions with no answer in the corpus. The correct behavior is a clear “I do not know” instead of an invented answer.
  • Questions that need two documents. These expose weak retrieval, since one good passage is not enough.
  • Questions with similar-sounding distractors. Two products with similar names, or figures from different years.
  • Questions about recent changes. If a document was updated, the answer should reflect the new version, not the old one.

Refresh the test set every few months. A set that never changes lets the team tune the pipeline to the test instead of to real users, and it will miss new failure modes as your documents grow.

Human Review vs Automated Checks

Use human review when the stakes are high or the questions are open-ended. Legal, medical, and financial answers deserve a person reading them, because a wrong answer costs more than the review time. Human review also catches tone problems, awkward phrasing, and subtle misreadings that automated scores miss.

Use automated checks for volume and speed. They belong in your CI pipeline: every pull request that touches retrieval, prompts, or model settings should run the eval set and report the scores. Set a threshold for faithfulness below which a change does not ship, and treat a drop in that number the same way you would treat a failing test in any other software.

Most teams end up with both. Automated checks run on every change, and a human reviews a random sample of real user questions each week. The sample keeps you honest about what automated scores cannot see.

Reading the Results: What to Fix First

Scores tell you where to look. Low context recall means the retriever is the problem, so check your embedding model choice, your chunk size, or whether hybrid search would help. Low faithfulness with good recall means the model is drifting from the sources, so tighten the prompt or lower the temperature. Low answer relevance usually means the prompt lets the model ramble, so ask for a direct answer first and detail second.

Fix one thing at a time and re-run the eval set after each change. If you change the chunk size, the prompt, and the model in one go, you will never know which change moved the score.

Keep a simple log of scores over time: date, change made, and the four metric scores. Trends matter more than any single number. A slow slide in faithfulness over a month usually means your documents changed and your pipeline did not keep up.

Common Mistakes in RAG Answer Quality Checks

The most common mistake is grading answers against the model’s own output instead of against the source documents. Rag answer quality is about what the sources support, not about whether the answer sounds confident. Confident and wrong is the worst outcome, and it is exactly what a good eval set is built to catch.

Other mistakes show up often. Testing only on questions the team wrote, instead of real user questions, hides the messy phrasing users actually type. Using a single judge model and never checking its grades against human grades lets judge bias go unnoticed. And measuring only the final answer, without checking retrieval, makes it impossible to tell whether a bad answer came from bad retrieval or bad generation.

FAQ

How many test questions do I need to evaluate a RAG system?

Start with 30 to 50 questions that cover your real use cases, including a few with no answer in your documents. That is enough to catch big regressions and to compare two versions of a pipeline. Grow the set as you learn which failure modes matter most.

How often should I re-run RAG evaluations?

Run the automated set on every change to retrieval, prompts, or model settings. Run a human review of a random sample of real user questions at least once a month, or once a week if the system answers high-stakes questions.

Evaluation is not a one-time task. It is the feedback loop that keeps a RAG system honest as documents change, models update, and users ask new kinds of questions. Start with a small test set and four simple metrics, run them on a schedule, and fix the weakest number first. If you are still building the pipeline itself, our Python RAG pipeline tutorial covers the setup that these checks are meant to measure.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.