Skip to content
AI-Native PM

Grounding evals: prove the answer stands on the facts

Chapter 7 of 8 in Context & Memory · 18 min

The launch review is on track until the compliance lead adds a comment to the checklist: how do you know the assistant answers from our policy documents and does not add things they do not say? You have a demo on your laptop and a good feeling from a hundred queries you ran by hand, and that is the entire answer. In the review itself someone says that the answers mostly come from the documents, someone else asks what "mostly" means as a number, and the team has no number to give. The launch slips by a sprint while the team gathers evidence it never planned to collect. The fix does not take a quarter of engineering work: it takes twenty test cases, a judge prompt, and an afternoon of labeling, and this chapter walks you through building exactly that.

What a grounded answer is

So far in this part you built the machinery: retrieval, the search stack, memory, budgets, and governed sources. This chapter shows you how to prove it works, because a pipeline that fetches the right passage can still produce an answer the passage does not support.

Grounding is the property you are checking: an answer is grounded when every key claim in it can be traced back to a retrieved source you trust. A key claim is a statement the user would act on, such as the price, the policy rule, the deadline, or the dosage. Connecting text ("here is what the policy covers") is not a key claim and needs no source. Grounding needs its own eval because the model produces fluent text either way. Given a passage that answers only half the question, it returns a complete answer in a fully confident tone, with the missing half filled in from its training data, and nothing in the output shows where the passage ended and the filled-in part began. In Why hallucinations are context failures, not model failures you saw why that happens, and in this chapter you measure how often it does.

An answer is grounded when a checker, either a person or a judge model, can trace every key claim to a source you trust. A claim with no source to trace it to cannot be checked at all.

The two-layer eval: check retrieval, then check the answer

A single "was the answer right" score is hard to act on, because a wrong answer has two causes with two fixes: either the right passage never came back (a retrieval problem), or it came back and the answer contradicted it or went beyond what it says (a generation problem, meaning a problem in how the model wrote the answer). So the eval has two layers, each with its own labeled data and its own score.

  • Layer one, retrieval checks: did the right passage come back at all? Build a labeled set of real user questions, each paired with the passage in your document set that answers it. Run every question through your retrieval step and record whether the labeled passage appeared in the results. The score is the hit rate, the share of questions where it did. This layer needs no judge model at all, which makes it cheap enough to rerun on every change to the search stack.
  • Layer two, answer checks: does the answer match what the passage says? Collect real answers together with the passages retrieval gave the model, then use a judge model (the CHECKER in the diagram) to check each answer claim by claim: for each claim, the judge quotes the line in the retrieved passages that supports it or marks the claim unsupported. The score is the grounded-answer rate, the share of answers with no unsupported key claim. A judge is a model grading another model, so it needs the same safeguards as the judges in Graders: deterministic, judges, and humans: a written rubric, a required quote behind every verdict, and a person who spot-checks a sample of its verdicts, because a judge's verdicts can get less accurate over time, just as the product's answers can, and checking a sample is how you find out.

The diagram shows layer two on one answer: the checker traces two of the answer's three claims to the sources and finds NO SOURCE for the third, so the pass bar stops at two of three and the gate HOLDS, which means the answer does not pass.

Keeping the two scores separate also tells you which fix to fund. If the hit rate is low, work on the search stack before anyone touches a prompt. If the hit rate is high and the grounded-answer rate is low, retrieval returned the right passages and the answers were not based on them, so the fix is prompt and instruction work. If you combine the two into one score, you cannot tell which problem you have.

Use two numbers as your release gate, not the ranking scores

Retrieval research uses scores with names like MRR, NDCG, and precision at k, which all measure where in the results list the right passage appeared. They are useful while an engineer tunes the search stack, but they do not work as release gates, because each can improve while users keep getting the same wrong answers. Similarity scoring is worse: an answer that states the opposite of its source shares nearly all its words with it, so it gets a high similarity score.

A release gate (the check a change must pass before it ships) needs numbers that describe what a user experiences, and the two layers already give you those numbers:

  • Retrieval hit rate: how often the right passage comes back for a question you labeled.
  • Grounded-answer rate: how often an answer contains no key claim the judge could not trace to a source.

Add both to your release gate the way you set up any quality dimension in The quality bar: decide what good means: a number, a bar (the threshold the number must meet), and an agreed rule for changes that come in below it. Then the question that held up the launch review has a ready answer, which you read off a dashboard instead of arguing from a demo.

Show the sources in the interface

Provenance, meaning the display of which passages an answer drew from, is a trust feature: citations that users can check encourage them to verify an answer instead of accepting it blindly, which is why research products such as Perplexity attach numbered citations to every answer. You also get free audits: users click the citations that look wrong, so every flag and complaint about a source is a grounding check you did not have to pay for. Route those reports to whoever owns the eval, following the approach in Metacognition: help people catch wrong answers.

Users trust a product that says when it found nothing solid more than one that answers anyway and presents the unsourced answer exactly like a sourced one.

In practice, when retrieval finds nothing or only weak matches, the product says so and stops, instead of presenting an unsourced answer in the same format as a sourced one. Declining costs you one interaction, while an unsourced answer can end up in a public screenshot.

Grounding gets worse after launch, so check a sample of live answers every week

A passing eval proves the product was grounded on launch day, and only on launch day. After launch, documents get rewritten, the index refreshes on its own schedule or stops refreshing without anyone noticing, and users start asking about topics your labeled set never included. Each of these can move your two numbers without any change to your code. The cheap protection is a weekly sample: pull a few dozen live question-and-answer pairs, run them through the same judge, and chart the two rates next to the bar you set at launch, as you learned to do for every quality dimension in Production signals: evals after the ship. If the hit rate falls on a recently rewritten policy, treat that as a warning about stale content as well as an eval result, and feed it back into the rules you wrote in Freshness and conflicts: govern the knowledge you answer from.

Try it now

Build the twenty-case grounding eval for your own document set. Allow about an hour, using the tools you already have.

Get your questions. Pull ten real questions users ask of your document set, from tickets, chat logs, or search queries. For each one, find the passage that answers it and record the pair. This is your labeled retrieval set.

Run the retrieval check. Send the ten questions through your retrieval step and record, for each, whether the labeled passage came back in the results. Write down the hit rate.

Collect ten answers. Ask your product ten more real questions and capture, for each, the full answer and the passages retrieval handed the model.

Write the judge prompt. Instruct a strong model to split each answer into factual claims and, for each, quote the supporting line from the retrieved passages or mark it unsupported. An answer passes only when every key claim has a quoted source, and the share that passes is your grounded-answer rate.

Spot-check five. Read five of the judge's verdicts against the sources yourself. If you overrule more than one, tighten the rubric and rerun the judge before you trust any number it produced.

Set the gate. Put the two rates side by side, pick the bar a release would really have to meet, and write in one sentence what happens when a number falls below it.

Scale it down: eight cases, four per layer, and two spot-checks give you the same two numbers in half the time, and you can expand the set later.

Chapter Summary

  • An answer is grounded when every claim the user would act on can be traced back to a retrieved source you trust. A fluent answer with a claim you cannot trace to a source is not grounded, only confident-sounding.
  • The model produces confident-sounding text whether or not the passages support it, so grounding has to be measured, never assumed from a demo.
  • The eval runs in two layers: a retrieval check (hit rate against a labeled question-and-passage set) and an answer check (a judge model tracing claims to sources, spot-audited by a human).
  • Keep the two scores separate so you know which fix to fund: if the hit rate is low, work on search, and if the hit rate is high but the grounded-answer rate is low, work on prompts and instructions.
  • Use the hit rate and the grounded-answer rate as your release gate. Ranking and similarity scores help engineers tune the search, but they are not evidence that a release is ready.
  • Show sources in the interface, and when retrieval finds nothing solid, have the product say so instead of answering anyway. Every user who clicks a citation that looks wrong gives you an audit you did not pay for.
  • A displayed source must support the claim it sits next to, so put citation-claim match in the judge's rubric.
  • Grounding gets worse after launch as documents, indexes, and the mix of questions change, so every week run a sample of live traffic through the judge and compare the two rates with the bar you set at launch.
  • Every decision you made in this part, from sources to memory to this grounding bar, is ready to go on one page, and Write your Knowledge Charter and ship a product that knows its facts walks you through writing it.

Sources

  • Es, S., James, J., Espinosa-Anke, L., & Schockaert, S. (2023). RAGAS: Automated Evaluation of Retrieval Augmented Generation. arXiv:2309.15217.
  • Rashkin, H., Nikolaev, V., Lamm, M., et al. (2023). Measuring Attribution in Natural Language Generation Models. Computational Linguistics.
  • Gao, T., Yen, H., Yu, J., & Chen, D. (2023). Enabling Large Language Models to Generate Text with Citations. EMNLP 2023.
  • Husain, H. (2024). Your AI Product Needs Evals. hamel.dev (last verified July 2026).