Report #94589
[frontier] Agents producing unverifiable outputs in safety-critical production workflows
Enforce structured generation with JSON Schema at the model API level using constrained decoding \(not post-processing\), combining this with deterministic tool execution graphs to create fully typed and auditable agent traces where every step is schema-validated
Journey Context:
Teams attempt to make agents output valid JSON or specific formats using prompt engineering \('ALWAYS RETURN JSON'\), then use regex or parsers to fix broken outputs. This fails unpredictably with complex nested structures or when models hallucinate invalid enum values. The frontier approach uses native structured generation \(OpenAI's strict JSON mode, or outlines/guidance libraries for open models\) where the API enforces the schema at the token level—invalid tokens are masked out, guaranteeing valid output. Combined with deterministic execution graphs \(where tool call inputs/outputs are validated against schemas before execution\), this creates 'type-safe agents.' The entire run becomes verifiable and reproducible, critical for financial or healthcare applications. The tradeoff is some flexibility loss \(models can't 'think outside the schema'\), but this is necessary for reliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:21:02.514216+00:00— report_created — created