advanced generation-grounding 30 min read

Faithfulness and Groundedness as Measurable Quantities

HyDE modeled the quality of a generated answer with a single hallucination rate p. Here we stop modeling it with a knob and measure it on the text itself — as two numbers, not one. Faithfulness is the precision of an answer's atomic claims against the retrieved context (what fraction of what you said is supported); groundedness is the recall (what fraction of the supportable facts you used). They diverge, a noisy judge measures both with a bias we debias and a confidence we calibrate, and trading coverage for guaranteed faithfulness is the abstention frontier.

From a hallucination rate to a measured quantity

HyDE left us with a knob. It wrote a hypothetical answer, embedded it, and retrieved real documents near it — and its whole risk lived in a single number, the rate pp at which the generator hallucinated about the entity in the question. We could turn that knob and watch recall fall, but we never measured it. The closing question was explicit: turning pp into a measured quantity, on real generated text rather than a synthetic von Mises–Fisher knob, is the next step.

That is the step we take here. The object we measure is not a knob but a generated answer, and the first thing to notice is that “is it faithful?” is the wrong question — it has two answers, not one. An answer is a set of atomic claims; the context the system retrieved is a set of supportable facts. The two sets can fail to coincide in two independent ways. The answer can say things the context does not support — it can hallucinate — and it can omit things the context does support — it can be incomplete. Faithfulness is the first failure; groundedness is the second. A single “factuality score” collapses them, and in doing so hides the trade between them that every generation system actually makes.

Faithfulness is precision, groundedness is recall

Write the answer’s atomic claims as C={c1,,cn}C = \{c_1, \dots, c_n\}, and let SCS \subseteq C be the subset of claims the context supports. Let FF be the set of supportable facts in the context. Each supported claim grounds one fact in FF — it is an instance of that fact in the answer.

Definition 1 (Faithfulness and groundedness).

The faithfulness of an answer is the precision of its claims against the context,

faithfulness(C)  =  SC  =  #{supported claims}#{claims made},\text{faithfulness}(C) \;=\; \frac{|S|}{|C|} \;=\; \frac{\#\{\text{supported claims}\}}{\#\{\text{claims made}\}},

and the groundedness (or coverage) is the recall of the supportable facts,

coverage(C)  =  {fF:some claim in S grounds f}F  =  #{facts the answer used}#{facts available}.\text{coverage}(C) \;=\; \frac{|\{\, f \in F : \text{some claim in } S \text{ grounds } f \,\}|}{|F|} \;=\; \frac{\#\{\text{facts the answer used}\}}{\#\{\text{facts available}\}}.

These are not new metrics. They are precision and recall — the same pair the evaluation layer built for retrieval — read over an answer’s claims instead of a ranking’s documents. Faithfulness divides by the number of claims the answer makes; coverage divides by the number of facts the context offers. The two denominators are different objects, and that difference is the whole story: a precision over claims and a recall over facts can move independently because a longer answer adds to the precision denominator without touching the recall denominator, and a fact can be grounded by many claims or none.

The collapse anchor pins the definition to the imported machinery. A perfect judge — one with sensitivity and specificity equal to one — labels each claim’s support exactly, so its measured faithfulness is the mean of the true support labels, which is precisely precision_at_k over the claim set. The notebook asserts this equality to machine precision; faithfulness is not like precision, it is precision, over the right index set.

Q3 revenue was $4.2B+0.73bRevenue up 8% YoY+0.63bBeat consensus+0.31bGross margin expanded to 41%+0.73bRaised full-year guidance+0.63bCloud segment grew 25%-0.26b$2B buyback announced-0.26bNew data center in Austin-0.26bFX headwinds ~2 points+0.31bτ = 0.50
faithfulness = precision
1.00
coverage = recall
1.00
claims retained
6 / 9
hallucinations kept
0

16 synthetic finance filings (one vMF company prototype each), context = top-3retrieved; a claim is supported iff its cosine to a context fact clears 0.78. The lenient judge (AUC 0.83) over-endorses, so the naive faithfulness 0.70 is biased above the oracle 0.62. Numbers mirror faithfulness_groundedness.py; the lab recomputes Panel A's precision/coverage at the live τ and Panel C's ECE from the baked reliability bins, and bakes the corpus-derived confidences, frontier, calibration, and per-claim bits.

Terse versus verbose: why the two diverge

Because faithfulness counts over claims and coverage over facts, the two pull apart as the answer’s length changes.

Proposition 2 (Precision and recall diverge with verbosity (demonstrated)).

On the worked corpus, a terse answer of a single supported claim has faithfulness 1.001.00 and coverage 0.330.33; a verbose answer of a dozen claims, half of them invented, has faithfulness 0.530.53 and coverage 1.001.00. The two move in opposite directions, and their harmonic mean — the F1 of generation — peaks at an interior answer length (five claims here), neither a single claim nor an exhaustive one.

The intuition is the one any careful writer knows. A terse answer states only what it is sure of: it is faithful but thin. A verbose answer reaches for completeness, and somewhere past the facts it actually has, it begins to invent — coverage saturates while precision erodes. Reporting one number forces a choice the data does not support. The honest summary is the pair, and the geometry that produces it is on the frontier panel above: the terse and verbose answers are the two extremes of one precision–recall curve.

Measuring with a noisy judge

On synthetic text we have an oracle for support. On real text we do not — we have an LLM judge, and a judge is an instrument with error. Its sensitivity (the rate at which it endorses a genuinely supported claim) and its specificity (the rate at which it rejects an unsupported one) are both below one, and a lenient judge that over-endorses will report a faithfulness number that is systematically wrong.

Proposition 3 (The judge biases the measurement).

The naive faithfulness — the mean of the judge’s per-claim verdicts — estimates not the latent supported fraction π\pi but pobs=πse+(1π)(1sp)p_{\text{obs}} = \pi\,\mathrm{se} + (1-\pi)(1 - \mathrm{sp}), where se,sp\mathrm{se}, \mathrm{sp} are the judge’s sensitivity and specificity. For an over-endorsing judge this overstates π\pi: on the worked panel the judge reports faithfulness 0.700.70 where the oracle is 0.620.62.

The fix is the prevalence correction from epidemiology, where the same problem — estimating how many people have a disease from an imperfect test — is a century old.

Theorem 4 (Rogan–Gladen debiasing).

Inverting the bias relation gives the unbiased estimate

π^  =  pobs+sp1se+sp1,\hat\pi \;=\; \frac{p_{\text{obs}} + \mathrm{sp} - 1}{\mathrm{se} + \mathrm{sp} - 1},

whose variance scales as 1/J21/J^2 in the Youden index J=se+sp1J = \mathrm{se} + \mathrm{sp} - 1 and diverges as the judge degrades toward a coin flip. With the audited rates, the correction recovers the oracle faithfulness exactly; the notebook pins π^\hat\pi to 0.620.62.

The correction is only as good as the audit, and the judge’s confidence carries a second problem: it is not a probability. A judge that says ”0.90.9 supported” should be right nine times in ten, and an over-confident one is not. We measure that gap with the expected calibration error and close it with the recalibrators the evaluation layer built — Platt scaling and isotonic regression — fit on held-out claims. The raw judge here has ECE 0.1250.125; Platt lowers it to 0.1200.120 and isotonic to near zero, and Platt does so while preserving the ranking exactly, so a recalibrated confidence is a probability we can threshold without disturbing which claims the judge prefers. The calibration panel above shows the reliability diagram move toward the diagonal.

The frontier and the back-off guarantee

A calibrated confidence is a cut we can turn. Retain only the claims the judge is confident enough about, and the answer’s precision rises as its recall falls — the back-off frontier, swept by the confidence cut τ\tau.

Algorithm 5 (Confidence-cut back-off).

Given calibrated per-claim confidences c~i\tilde c_i and a cut τ\tau, the retained answer is C^(τ)={i:c~iτ}\hat C(\tau) = \{\, i : \tilde c_i \ge \tau \,\}. Raising τ\tau removes the least-confident claims; faithfulness rises and coverage falls along the frontier. An empty retained set is an abstention.

A heuristic cut gives a frontier but no promise. The promise comes from conformal risk control, which fixes the cut so that the expected false-claim rate is bounded — a distribution-free, finite-sample guarantee on a monotone loss.

Theorem 6 (Conformal risk control bounds the false-claim rate).

Let the per-answer loss be the fixed-denominator false-claim rate L(λ)=1k#{retained and unfaithful at cut λ}L(\lambda) = \tfrac{1}{k}\#\{\text{retained and unfaithful at cut } \lambda\}, which is non-increasing in λ\lambda and bounded above by B=1B = 1. Writing R^n(λ)\hat R_n(\lambda) for the empirical mean of L(λ)L(\lambda) over the nn calibration answers, the threshold

λ^  =  inf{λ:nn+1R^n(λ)+Bn+1α}\hat\lambda \;=\; \inf\Big\{ \lambda : \tfrac{n}{n+1}\hat R_n(\lambda) + \tfrac{B}{n+1} \le \alpha \Big\}

controls the expected test loss, E[1faithfulness(λ^)]α\mathbb{E}[\,1 - \text{faithfulness}(\hat\lambda)\,] \le \alpha. On the worked panel at α=0.10\alpha = 0.10 the realized false-claim rate is 0.030.03, retaining about a third of the claims.

The fixed denominator is load-bearing: dividing by the shrinking retained count gives a fraction-of-retained loss that is not monotone, and conformal risk control silently fails on it — the notebook reproduces the counterexample so the prose does not claim the naive loss works. And the guarantee is in expectation over the calibration draw, not a single realization: a deployment can overshoot, the honest caveat the rigor note records. Trading coverage for a guaranteed faithfulness this way is the entry to selective generation — when the certified-faithful answer is too thin to be useful, the system should abstain rather than emit. Choosing when to abstain is the next topic.

Bits of grounding

There is a second reading of “grounded,” and it is information-theoretic. A claim is grounded when the context raises its probability — when knowing the retrieved filings makes the claim more likely than it was a priori. That is exactly a positive pointwise mutual information.

Proposition 7 (A supported claim has positive PMI with the context (demonstrated)).

For a claim whose nearest answer prototype is aa, the bits the context contributes are

pmi(a;ctxq)  =  log2p(actx,q)p(aq),\mathrm{pmi}(a\,;\,\text{ctx} \mid q) \;=\; \log_2 \frac{p(a \mid \text{ctx}, q)}{p(a \mid q)},

positive when the context concentrates the answer onto aa and non-positive when it argues elsewhere. On the panel, supported claims average +0.49+0.49 bits and hallucinated claims 0.73-0.73 bits, with 94%94\% of hallucinations carrying non-positive bits.

This closes the loop with the prerequisite that supplied the answer model. Faithfulness, the judge’s verdict, and positive bits-of-grounding are three views of one event: a claim the retrieved context supports. The bits panel above shows the sign split — the supported claims piled on the positive side of zero, the hallucinations on the negative.

Where this sits

We began with a knob and end with a measurement. Faithfulness and groundedness are precision and recall over an answer’s claims; they diverge, so we report both. A noisy judge measures them with a bias we remove by Rogan–Gladen and an over-confidence we remove by calibration. And the back-off frontier — coverage traded for a conformally guaranteed faithfulness — is the decision surface of the next topic, selective generation, where the system that cannot certify enough faithful claims should abstain rather than guess. The bits-of-grounding reading ties the whole construction back to the information the context carries, the thread the retrieval-information-theory layer began.

Connections

  • The direct prerequisite and the handoff: HyDE modeled the faithfulness of its generated hypothetical with a single hallucination rate p that no amount of Monte-Carlo averaging could remove. This topic turns that rate into a measured, two-sided quantity on real generated claims rather than a synthetic von Mises–Fisher knob, picking up exactly where HyDE's open question left off. query-transformation-hyde
  • Supplies the bits-of-grounding view: a supported claim is exactly one whose pointwise mutual information with the retrieved context is positive, and a hallucination one whose PMI is non-positive. We import its answer-posterior and entropy machinery to score each atomic claim's grounding in bits, the information-theoretic reading of faithfulness. pmi-retrieval-value
  • The judge that measures faithfulness is the noisy Bernoulli instrument that topic built; faithfulness is the mean of its per-claim verdicts, a biased estimate of the latent supported fraction that Rogan–Gladen debiases. We import its judge form, audited sensitivity and specificity, and Rogan–Gladen correction to read the raw faithfulness number honestly. llm-as-judge-ragas
  • The distribution-free back-off guarantee that turns a confidence cut into a controlled false-claim rate. We import its conformal-risk-control machinery so that trading coverage for guaranteed faithfulness is a finite-sample guarantee on a monotone loss, not just a heuristic threshold. conformal-factuality
  • Supplies the calibration suite that makes the judge's confidence a probability before it can drive the back-off cut: the reliability diagram, the expected calibration error, and the Platt and isotonic recalibrators we import to recalibrate the judge in the calibration panel. significance-testing-calibration
  • The root of the evaluation layer and the home of precision and recall, the two metrics this topic recognizes as faithfulness and groundedness over atomic claims rather than retrieved documents. The collapse anchor is exact: a perfect judge's faithfulness equals the imported precision at k to machine precision. set-metrics-precision-recall-map-mrr
  • Provides the finance document manifold the whole construction sits on: one von Mises–Fisher company prototype per filing, so a supported claim aligns with its company's context direction and a hallucinated claim points off it. We reuse its geometry and separable score to build the claim-grounding model. dense-retrieval-dual-encoders

References & Further Reading