How it works · 14 of 37 Frontier

How do you evaluate a RAG system's answers?

Is the answer grounded?

Evaluating RAG: Score retrieval (right material fetched?) and faithfulness (answer sticks to it?) separately.

Loading the animation…

Say it like this Check a RAG answer in two halves: did search fetch the right page, and does every sentence come from that page? Two scores tell you which half to fix.

Under the hood — for builders
Faithfulness, step by step
The checker splits the answer into claims, then marks each Yes (a fetched page supports it) or No. Priya's answer:
The two prompts
Word for word from the paper; copy them to build your own checker:
What to test on
One row per test question. Priya's two cases as rows:
Retrieval, with labels
Each test question has a known right page: count how often search fetches it.
Retrieval, no labels
Checker copies the needed sentences; score = copied ÷ fetched (“context relevance”). Misses out-of-date pages.
Third score
Does the answer address the question at all? Ragas calls it “answer relevance”.
Can you trust the checker?
How often it picked the same answer as two people did (WikiEval: 50 recent Wikipedia pages):
Typical cost
About four extra model calls per answer checked (Es et al., §3). Run on test sets.
Tools
Ragas: open-source library. ARES: small trained judge models plus a few human labels.
Watch out
The checker can be wrong: read every No. A stale or planted page (A15) still scores faithful.
Sources
Es, James, Espinosa-Anke & Schockaert, Ragas: Automated Evaluation of Retrieval Augmented Generation (arXiv 2309.15217v2) · Saad-Falcon, Khattab, Potts & Zaharia, ARES: An Automated Evaluation Framework for Retrieval-Augmented Generation Systems (arXiv 2311.09476v2, NAACL 2024).

What happens in the evaluating RAG animation, step by step?

  1. Priya asks the shop's chatbot if she can get her refund in cash. It answers in three confident sentences. One of them is made up. Can you spot it?
  2. Your turn: tap the sentence you think is made up.
  3. Mark each sentence against the store policy. Two match a line. The third says cash, but the page says card: the bot made it up, and it's the one that answers her question.
  4. Priya goes to the shop for her cash. There is no cash refund. One made-up sentence, one let-down customer.
  5. No one can check 10,000 answers a day by hand. A checker model does what you just did, for every answer. That score is called faithfulness.
  6. This answer matches its page perfectly, and it's still wrong: search fetched the 2023 policy. That's the other score, retrieval. Two dials tell you which half to fix.

What everyday example explains evaluating RAG?

Marking an open-book exam: right page opened? copied correctly?

Why should a team care about evaluating RAG?

Without it, teams tune blindly.