What is source grounding (hallucination detection)?
Source grounding checks whether the factual claims in an AI response are actually supported by the source material the model was given. When a claim has no backing in that material, it is flagged as a likely hallucination.
Why it matters
Large language models can produce fluent, confident text that is not true. In a retrieval-augmented (RAG) or agent workflow, the model is handed context — documents, search results, tool outputs — and is expected to answer *from* it. Source grounding verifies that expectation is met, so unsupported statements are caught before they reach your users.
How it works
Source grounding runs as a layer inside the G8KEPR Verification Engine. For each response, it:
- 1.Extracts the claims. The output is broken into individual, checkable factual statements.
- 2.Aligns each claim to the sources. Every claim is compared against the provided context using semantic matching, not just keyword overlap, so paraphrased support still counts.
- 3.Scores the support. Each claim gets a grounding score reflecting how well the source material entails it.
- 4.Flags the gaps. Claims that fall below your threshold are marked as ungrounded — the signal that a hallucination may be present.
Source grounding evaluates factual claims. Opinions, instructions, and creative or stylistic phrasing are not treated as claims to verify.
What you get back
Verification results identify which claims were grounded, which were not, and an overall grounding score for the response. You can use that score to allow, warn, or block output.
{
"grounded": false,
"grounding_score": 0.62,
"unsupported_claims": [
"The policy took effect in 2019."
]
}Tuning it
- ▸Set a threshold that matches your risk tolerance — stricter for regulated or customer-facing use, looser for internal drafting.
- ▸Provide good sources. Grounding is only as strong as the context you supply; thin or irrelevant retrieval produces more ungrounded claims.
- ▸Combine layers. Source grounding pairs with the Verification Engine's other checks for defense in depth.
Start in monitor mode to see grounding scores on real traffic, then enforce a threshold once you have a baseline.