groundcheck_detect_hallucinations
Identify unsupported or contradicted claims in a RAG answer by comparing it to source texts. Returns exact spans and failing source passages for targeted corrections.
Instructions
Find only the unsupported or contradicted claims in answer.
Use this in a fix-it loop where you only care about what's wrong, not a
full faithfulness report -- for the full picture with a score and every
claim's verdict, use groundcheck_evaluate_faithfulness instead.
Args:
answer: the RAG-generated answer text to check.
sources: list of {id, text} chunks the answer was generated from.
Returns an empty list if the answer is clean. Otherwise, each entry has
the exact answer span, the closest source passage that fails to support
it, and a one-line reason. Costs 2 model calls via your client's
sampling -- no API key needed if your client supports sampling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answer | Yes | ||
| sources | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hallucinations | Yes | Empty list means the answer is clean. |