Faithfulness
Check that answers stick to retrieved context instead of inventing unsupported claims.
In plain words
Faithfulness asks: is everything the AI said actually written in the documents it was shown, or did it make some of it up?
Think of it like…
A fact-checker holding an article next to its source documents, ticking each sentence as supported, unsupported or contradicted. The score is the proportion of sentences that tick "supported".
Where you’ve seen it
A policy assistant answers: "Returns are accepted within 30 days, you need the original receipt, refunds go to the original payment method, and express shipping is refunded too." The judge splits this into 4 claims and checks them against the retrieved policy chunk: the first three are supported, but "express shipping is refunded" appears nowhere (the policy says shipping fees are non-refundable). Faithfulness = 3 / 4 = 0.75. Across a 300-case run the mean is 0.91, but the team also tracks the share of answers with any unsupported claim (14%), because one invented sentence in an otherwise good answer is still a failure.
Words you’ll hear
- Atomic claim
- A single checkable statement extracted from the answer.
- Supported / unsupported / contradicted
- The verdict for a claim relative to the provided context.
- Groundedness
- Another name for faithfulness: the answer stays within the evidence.
- Faithful vs correct
- Faithful means consistent with the context; correct means consistent with the truth.
Visual diagram
Theory & deep dive
How the metric is computed
The common recipe (used by RAGAS and similar libraries) has two LLM calls. First, decompose the answer into short, self-contained claims ("The return window is 30 days", resolving pronouns so each claim stands alone). Second, verify each claim against the context with a prompt such as "Can this statement be directly inferred from the context? Answer supported, unsupported or contradicted", ideally asking for a quote from the context as evidence. The score is supported claims divided by total claims. Smaller NLI (natural language inference) models can replace the LLM for cheaper, faster checking at some cost in nuance.
Design decisions matter. Decide whether world knowledge counts: "Paris is the capital of France" isn't in your policy chunk, but flagging it as unsupported may be noise; many teams only allow it for trivial facts and require everything domain-specific to be grounded. Decide how to treat partial support and hedged statements. Provide the *full* context the model saw (including conversation history and tool outputs), or you'll mislabel correct claims as unsupported. Validate the judge against human labels on 100 or more answers, as with any LLM judge.
{"claim": "express shipping is refunded", "verdict": "unsupported", "evidence": null, "note": "policy says shipping fees are non-refundable"} Here the policy actually contradicts the claim, so a stricter taxonomy would label it contradicted and treat it as more severe.
Using it well and its limits
Report both the mean claim-level score and the answer-level failure rate (answers with at least one unsupported claim). The mean can look healthy (0.91) while one in seven answers contains an invention. Break results down by intent and by retrieval quality: when faithfulness drops because the context was empty or irrelevant, the model is guessing, and the fix is retrieval or an "I don't know" behaviour rather than a stricter prompt. Use it online as a guardrail (hold or flag answers below a threshold, or regenerate with a stricter prompt) when the added latency and cost are acceptable.
Limits: faithfulness says nothing about whether the answer is relevant, complete or correct. An answer that quotes the context perfectly but ignores the question scores 1.0; a refusal ("I can't find that") has no claims and may score 1.0 vacuously, so pair it with answer relevance and context recall. It also can't catch errors inside the source. Combine it with correctness evals against reference answers, citation checks (does each cited passage support its sentence?) and human review of a sample.
100 answers: 86 have 1.0, 14 have 0.5. Mean = (86 × 1.0 + 14 × 0.5) / 100 = 0.93, which sounds excellent, yet 14% of answers contain an unsupported claim.
How it works, step by step
Step 1 of 41. Capture the full context
Log the exact passages, tool outputs and history the model saw alongside the answer.
- Missing context
- false positives
When to use it & trade-offs
What it is
Faithfulness (also called groundedness) measures whether every claim in a generated answer is supported by the context the model was given: the retrieved passages, the tool results or the supplied document. It is computed by splitting the answer into atomic claims, checking each claim against the context with an entailment model or an LLM judge, and reporting the share of supported claims. A faithful answer can still be wrong if the context was wrong, so faithfulness separates generation errors (the model invented or distorted something) from retrieval errors (the context itself lacked or misstated the facts).
Why it matters: In RAG and document-QA products the promise is "answers come from your sources". Hallucinated details (an invented refund window, a made-up clause number) destroy trust and can create legal or safety exposure. Faithfulness is the most direct automated check on that promise, and because it only needs the question, context and answer (no reference answer) it can also run on live production traffic.
When to reach for it
- RAG and document-QA assistants with a grounding promise
- Production monitoring and guardrails without reference answers
- Separating generation errors from retrieval errors
When to avoid or be careful
- Reporting only the mean claim score
- Judging against truncated context
- Treating a faithful answer as a correct one
Faithfulness vs neighbouring RAG metrics
Strengths: No reference answer needed; works on live traffic.
Watch out: Ignores relevance and correctness of the source.
Strengths: Measures what users care about.
Watch out: Needs reference answers or labels.
Strengths: Catches off-topic but grounded answers.
Watch out: Says nothing about factual support.
Interview signals & numbers to know
When this topic comes up
- “The assistant made up a policy”
- “How do we measure hallucination in RAG?”
- “Groundedness”
- Claim extraction and NLI
- Faithful but wrong answers
Benchmarks & rules of thumb
- 3 / 4 = 0.75
- claim-level score in the example answer
- 0.93 vs 14%
- mean score versus answers with an unsupported claim
- 100+
- human-labelled answers to validate the judge
Common mistakes & follow-ups
Common interview mistakes
- Judging against only the top chunk when the model saw five.
- Counting a vacuous refusal as perfect faithfulness.
- Assuming a score of 1.0 means the answer is right.
Likely interviewer follow-ups
- How would you measure hallucination in a RAG assistant?
- What's the difference between faithfulness and correctness?
- How would you use faithfulness as a production guardrail?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Faithfulness with generative AI interview Q&A and hands-on practice.