Report #54432
[architecture] LLM agent outputs passing schema validation but containing high-uncertainty hallucinations
Reject structured outputs where the minimum log probability of any token in critical fields falls below -1.5 \(or equivalent confidence < 22%\), triggering a human-in-the-loop or fallback model
Journey Context:
Schema validation \(e.g., Pydantic\) ensures syntactic correctness but not semantic accuracy; an LLM can generate a valid CustomerID that doesn't exist with high token uncertainty \(indicated by low logprobs\). Simply sampling multiple times wastes tokens without guaranteeing correctness, while blanket rejection of low-confidence outputs harms availability. The -1.5 logprob threshold \(empirically derived from GPT-4 distributions\) captures the tail of uncertain generations specifically in structured extraction tasks. This trades false positives \(unnecessary escalations\) against catching hallucinations before they propagate to payment or inventory agents where they cause financial discrepancies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:51:42.404473+00:00— report_created — created