Tool Receipts, Not Zero-Knowledge Proofs: Practical Hallucination Detection for AI Agents
Abstract
AI agents that execute tasks via tool calls frequently hallucinate results - fabricating tool executions, misstating output counts, or presenting inferences as facts. Recent approaches to verifiable AI inference rely on zero-knowledge proofs, which provide cryptographic guarantees but impose minutes of proving time per query, making them impractical for interactive agents. We propose NabaOS, a lightweight verification framework inspired by Indian epistemology (Nyaya Shastra), which classifies every claim in an LLM response by its epistemic source (pramana): direct tool output (pratyaksha), inference (anumana), external testimony (shabda), absence (abhava), or ungrounded opinion. Our runtime generates HMAC-signed tool execution receipts that the LLM cannot forge, then cross-references claims against these receipts to detect hallucinations in real time. We evaluate on NyayaVerifyBench, a new benchmark of 1,800 agent response scenarios across four languages with injected hallucinations of six types. NabaOS detects 94.2% of fabricated tool references, 87.6% of count misstatements, and 91.3% of false absence claims, with <15ms verification overhead per response. For deep delegation (agents performing multi-step web tasks), our cross-checking protocol catches 78.4% of URL fabrications via independent re-fetching. We compare against five approaches: zkLLM (cryptographic proofs, 180s/query), TOPLOC (locality-sensitive hashing), SPEX (sampling-based proof of execution), tensor commitments, and self-consistency checking. NabaOS achieves the best cost-latency-coverage trade-off for interactive agents: 94.2% coverage at <15ms versus zkLLM's near-perfect coverage at 180,000ms. For interactive agents, practical receipt-based verification provides better cost-benefit than cryptographic proofs, and epistemic classification gives users actionable trust signals rather than binary judgments.
Figures & tables
| Pramāṇa | Source | Verification Method | Confidence |
|---|---|---|---|
| Pratyakṣa | Direct tool output | Check against receipt | Highest |
| Anumāna | Inference from tool data | Check that premises exist | Medium |
| Upamāna | Analogy or comparison | Check that comparison is valid | Lower |
| Śabda | External source cited | Check that source was fetched | Depends on source |
| Abhāva | Absence claim | Check tool returned empty | Medium |
| Ungrounded | No evidence | Cannot verify—flag | Lowest |
| Type | Description | Count/Lang |
|---|---|---|
| Fabricated Tool Call | LLM references a tool that was never executed | 50 |
| Count Mismatch | Tool returned results; LLM reports | 50 |
| Fact Mismatch | Tool output states ; LLM reports for the same field | 50 |
| Inference-as-Fact | LLM presents an inference as if directly from tool output | 50 |
| False Absence | Tool returned results; LLM claims “nothing found” | 50 |
| Source Fabrication | LLM cites a source URL it never fetched | 50 |
| Method | Detection Rate | FPR | Latency | Cost/req |
|---|---|---|---|---|
| No Verification | 0% | 0% | 0 ms | $0 |
| Self-Consistency | 45% | 12% | +3–5 s | +$0.03 |
| RAG-Grounding | 52% | 18% | +1–2 s | +$0.01 |
| Output Regex | 35% | 8% | +2 ms | $0 |
| SVIP-style | 68% | 10% | +50 ms | $0 |
| NabaOS (ours) | 91% | 4% | +12 ms | $0 |
| Hallucination Type | NabaOS | Self-Cons. | SVIP | Regex |
|---|---|---|---|---|
| Fabricated Tool Call | 94.2% | 38% | 65% | 20% |
| Count Mismatch | 87.6% | 52% | 71% | 45% |
| Fact Mismatch | 89.1% | 41% | 68% | 30% |
| Inference-as-Fact | 82.3% | 55% | 72% | 15% |
| False Absence | 91.3% | 35% | 60% | 25% |
| Source Fabrication | 78.4% | 48% | 58% | 12% |
| Method | EN | HI | ZH | ES | Avg |
|---|---|---|---|---|---|
| NabaOS | 92.8% | 90.1% | 88.7% | 91.5% | 90.8% |
| SVIP-style | 72.4% | 58.3% | 55.1% | 64.7% | 62.6% |
| Self-Consistency | 48.2% | 39.7% | 36.8% | 43.1% | 42.0% |
| Trust Level | Actual Correctness | Calibration Error |
|---|---|---|
| Fully Verified | 98.7% | 1.3% |
| Mostly Verified | 94.2% | 3.1% |
| Partial | 82.5% | 5.8% |
| Unreliable | 23.4% | N/A (correctly flagged) |
| Ungrounded | 71.2% | N/A (opinion, no ground truth) |
| Property | ZK Proofs | NabaOS Receipts |
| Proves that… | Model ran correctly | Claims are grounded |
| Verification overhead | Minutes per query | 15 ms per response |
| Hardware requirements | Specialized GPU | Any machine |
| Catches hallucination | No ∗ | Yes |
| Language-independent | N/A | Yes |
| User-facing signal | Binary (valid/invalid) | 5 trust levels |
Hallucination Detection
Hallucination detection identifies unsupported, fabricated, or evidence-inconsistent content in language and multimodal model outputs.
See all 78 papers