Report #64442
[architecture] Validating an agent's output only for JSON schema compliance misses semantic errors, like returning a structurally valid but non-existent database ID
Implement a two-tier validation gate: 1\) Programmatic schema validation \(JSON Schema\), and 2\) Semantic validation via a deterministic API check \(e.g., verifying the ID exists in the DB\) before handing off to the next agent.
Journey Context:
Schema validation is cheap and fast but only guarantees shape. Semantic validation is expensive \(requires DB queries or another LLM call\). However, without it, the next agent receives logically invalid data, leading to silent failures. Use deterministic checks where possible instead of relying on LLMs to verify facts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:39:02.920615+00:00— report_created — created