ConceptsGroundedness

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.groundedMeaning
supportedThe retrieved chunks back the answer.
partialSome claims are supported, others are not.
unsupportedThe 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.grounded as supported | partial | unsupported.
  • Verify: You use meta.grounded_score as a confidence signal in your UI.
  • Verify: You know strict mode refuses an unsupported answer and clears its sources.

Common failure modes