HallucinationDetector.ai

AI Agent Hallucination Detector for Multi-Step Workflows

Catch fabricated tool outputs, invented arguments, and compounding state errors across autonomous multi-step AI agent traces.

EX-02 · AGENT TRACE AUDIT
Samples:
Draft Under Inspection · Inline Claim Markup

In Varghese v. China Southern Airlines Co. Ltd., 925 F.3d 1339 (11th Cir. 2019), the court held that the Montreal Convention two-year statute of limitations is tolled during an automatic bankruptcy stay.

A subsequent review by Martinez & Patel (2024), Nature Vol. 628, DOI 10.1038/s41586-024-99104-x reported that retrieval grounding eliminates 99.4% of factual errors across legal filings.

By contrast, in Moffatt v. Air Canada, 2024 BCCRT 149, the British Columbia Civil Resolution Tribunal held an airline liable for negligent misrepresentation after its support chatbot invented a bereavement-fare policy.

+ Optional Source Context: Attach retrieved passages to check strict RAG faithfulness
96 / ~1,000 words
HIGH
4 Claims 2 Fabricated 1 Unsupported 1 Grounded
Interactive Sample · Live Engine Coming Soon
Struck · Fabricated Caseverdict_source: docket_index
Varghese v. China Southern Airlines, 925 F.3d 1339 (11th Cir. 2019)
No matching 11th Circuit opinion at 925 F.3d 1339. Documented fabricated citation from Mata v. Avianca, Inc., 678 F. Supp. 3d 443 (S.D.N.Y. 2023).
Struck · Fake DOIverdict_source: citation_index
Martinez & Patel (2024), Nature Vol. 628, DOI 10.1038/s41586-024-99104-x
DOI does not resolve in Crossref registry; no Nature Vol. 628 article by these authors exists.
Query · Unsupported Statverdict_source: claim_check
"retrieval grounding eliminates 99.4% of factual errors across legal filings"
Attributed to a non-existent study. Stanford RegLab (2024) still measured 17% to 33% error rates on legal RAG tools.
Grounded · Primary Recordverdict_source: public_record
Moffatt v. Air Canada, 2024 BCCRT 149
Verified against Civil Resolution Tribunal of British Columbia decision 2024 BCCRT 149 (February 14, 2024).
Interactive sample desk active · Live custom-text API activates once route is enabled No signup wall · Claim-by-claim reasoning · Primary-sourced methodology
Structured index trays and dividers illustrating multi-step agent trace verification
Multi-step agents compound early hallucinations into downstream tool calls unless each step is validated.

How Agent Hallucinations Compound Across Tool Calls

In single-turn chat, a hallucination produces one wrong paragraph. In an autonomous AI agent with tool access, a single hallucination at step 2 becomes the input state for steps 3 through 10. Agents commonly hallucinate in three distinct ways: inventing non-existent API parameters or record IDs, claiming a tool call succeeded when it actually returned an error or empty set, and fabricating intermediate summaries that contradict earlier tool responses.

An AI agent hallucination detector monitors the full trajectory (prompt -> tool call -> tool response -> final answer) rather than only the final user-facing message. Checking faithfulness at every step prevents silent data corruption and customer-facing policy errors.

Compare foundational grounding methods on our LLM hallucination detector and RAG hallucination detector pages, or evaluate enterprise observability suites in Galileo AI alternative and Patronus AI alternative.

Production Guardrails for Autonomous AI Agents

Deploy these five verification layers across every multi-step agent pipeline:

  1. Strict JSON schema validation on tool arguments: Reject invented enum values, malformed IDs, and unrequested fields deterministically before executing any side-effecting tool.
  2. Tool-output grounding check: Verify that every number, order status, or policy rule in the final user response is entailed by actual tool responses in the trace.
  3. Silent-error detection: Fail closed when a tool returns HTTP 500, timeout, or empty results so the agent never fabricates a polite success message.
  4. Step-level trajectory logging: Capture prompt, tool inputs, raw tool outputs, and final response together so faithfulness evaluators can replay exact state.
  5. Human-in-the-loop approval for external actions: Require explicit confirmation before refunding money, sending external emails, or modifying production records.

Agent Failure Modes and Deterministic Catches

Four real-world agent hallucination modes and the guardrail that stops each one:

Flagged PatternWhy Models Produce ItPrimary Verification Step
Phantom tool successAPI returned 404; agent tells user 'Your ticket was updated'Assert tool status == 200 before allowing confirmation copy
Invented record IDAgent guesses a customer_id or order_id not present in contextVerify all IDs against prior tool outputs via exact match
Policy fabricationSupport agent invents a discount or bereavement refund rule (as in Moffatt v. Air Canada)Strict RAG faithfulness check against official policy chunks
Argument schema driftAgent passes undocumented flags to a tool endpointStrict JSON Schema / Zod validation with additionalProperties: false

Observability Must Run on Traces, Not Just Final Answers

Verification Boundary

Evaluating only the final agent message misses half of production failures. Always ground the final answer against the raw JSON returned by each tool call.

Because agent trajectories grow long, context-window dilution makes later steps more prone to forgetting earlier tool constraints. Keep tool payloads compact and validate critical fields in deterministic code outside the LLM.

Return to the Hallucination Detector workbench or read how to reduce AI hallucinations for prompt and guardrail patterns.

Related Reading

Frequently Asked Questions

Why are AI agent hallucinations more dangerous than chat hallucinations?
Agents execute real tool calls and write to external systems, so an early fabricated parameter or false confirmation can cause financial or operational damage.
How did Moffatt v. Air Canada relate to AI agent hallucinations?
Air Canada's customer-support chatbot invented a retroactive bereavement-fare refund policy that contradicted the airline's published terms, and the tribunal held the airline liable.
Can JSON Schema validation stop all agent hallucinations?
Schema validation stops malformed arguments and invented enum values, but you still need faithfulness checks to ensure the agent reports tool outputs honestly.
What is trajectory evaluation in AI agents?
Trajectory evaluation inspects every intermediate reasoning step, tool call, and tool response in sequence rather than grading only the final message.
Which tools monitor agent hallucinations in production?
Enterprise platforms like Galileo AI, Patronus AI, and custom NLI/HHEM guardrails monitor multi-step agent traces; see our comparison guides for trade-offs.