Draft Agent Response Groundedness & Hallucination Auditor
audit_response_factualityCross-reference factual claims, numbers, and citations in a draft agent response against retrieved source passages to flag unsupported hallucinations before delivery.
Instructions
Cross-references factual claims, numbers, and citations in a draft agent response against retrieved source passages to flag unsupported hallucinations before delivery. Use when verifying that a generated answer is 100% grounded in source evidence before returning it to the user; for scrubbing inbound tool outputs for prompt-injection and invisible Unicode, use sanitize_tool_output_stream instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'claim' ('context' defaults to 'standard'), supports '?demo=true' or L402 (25 sats), and returns HTTP 400 if invalid.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"claim": "<claim>",
"context": "<context>"
},
"name": "audit_response_factuality"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| claim | Yes | Draft agent response or factual statement to verify for hallucinations. | |
| context | Yes | Authoritative source text or retrieved RAG passages that the claim must be grounded in. | |
| strictness | No | Entailment threshold required for numbers and dates; defaults to 'exact_entailment' when omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verdict | Yes | Audit outcome ('PASS', 'SUSPICIOUS', or 'FAIL'). | |
| verified_claims | Yes | Assertions directly entailed by the provided source context. | |
| unverified_claims | Yes | Hallucinated or unsupported assertions flagged for removal. | |
| groundedness_score | Yes | Factual support ratio from 0.0 (fabricated) to 1.0 (fully entailed). |