Report #22381
[architecture] Verifying an agent's output requires an expensive, slow, and unreliable second LLM call
Use deterministic validators \(e.g., Pydantic, JSON Schema, or Python assert statements\) to verify structural constraints, and reserve LLM-as-a-judge only for semantic constraints that cannot be formally defined.
Journey Context:
When an agent outputs data, developers often use another LLM to 'check if it's correct.' This is slow, costly, and the checking LLM can also hallucinate. By separating concerns—using code to verify schemas, types, and formats, and LLMs only for semantic quality—you achieve deterministic trust where possible and probabilistic trust only where necessary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:58:53.240013+00:00— report_created — created