Groundedness
The anti-hallucination gate: after the model drafts an answer, the system checks whether the retrieved chunks actually support it.
Audience: developers who care about answer faithfulness.
What you will accomplish: understand the verify_answer node, the meta.grounded
field, and strict-mode refusal.
What verification does (#2)
When GROUNDEDNESS_ENABLED=true (default), the verify_answer node compares the drafted
answer against the retrieved chunks and reports a verdict on meta.grounded:
meta.grounded | Meaning |
|---|---|
supported | The retrieved chunks back the answer. |
partial | Some claims are supported, others are not. |
unsupported | The retrieved chunks do not back the answer. |
It also exposes meta.grounded_score — the fraction of answer sentences that are
supported.
Heuristic vs LLM mode
GROUNDEDNESS_MODE controls how the check runs:
heuristic(default) — no extra LLM call; fast, deterministic sentence-support scoring.llm— a JSON-returning LLM judge evaluates support (more nuanced, costs an extra call).
GROUNDEDNESS_MIN_SCORE (default 0.5) is the fraction of answer sentences that must be
supported for the answer to count as grounded.
Strict-mode auto-refusal
In strict mode, an unsupported answer is not shipped. When
STRICT_REFUSE_ON_UNGROUNDED=true (default), the drafted answer is replaced by the
“Not in the knowledge base” refusal and its sources are cleared.
Verify your result
- Verify: You can read
meta.groundedassupported | partial | unsupported. - Verify: You use
meta.grounded_scoreas a confidence signal in your UI. - Verify: You know strict mode refuses an
unsupportedanswer and clears its sources.
Common failure modes
Related next steps
- See how citations and grounding combine into trust in Trust & citations.
- Review the upstream score gate in Retrieval.
- Tune the flags in Configuration.