groundcheck_evaluate_faithfulness
Score how well a RAG-generated answer is supported by provided source chunks, claim by claim, returning a faithfulness score, claim counts, and verdicts for unsupported or contradicted claims.
Instructions
Score how well answer is supported by sources, claim by claim.
Use this when you need a faithfulness score (0-1) and want to see every
claim's verdict, not just the problems -- for that, use
groundcheck_detect_hallucinations instead, which is tighter and cheaper.
Args:
answer: the RAG-generated answer text to check.
sources: list of {id, text} chunks the answer was generated from,
e.g. [{"id": "doc1#chunk3", "text": "..."}].
response_format: "concise" (default) returns the score, claim counts,
and only unsupported/contradicted claims. "detailed" returns
every claim's verdict.
Returns a score (supported/total claims), counts by verdict, and a claims
list (filtered per response_format). Costs 2 model calls via your client's
sampling (decompose, then verify) -- no API key needed if your client
supports sampling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answer | Yes | ||
| sources | Yes | ||
| response_format | No | concise |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | supported claims / total claims, 0-1. | |
| claims | Yes | Concise: only problem claims. Detailed: every claim. | |
| supported | Yes | ||
| unsupported | Yes | ||
| contradicted | Yes | ||
| total_claims | Yes |