Report #95540
[frontier] Agent output format drifts from specification over long context window
Migrate format and structural constraints from natural language prompts to JSON schemas or function signatures used with structured output modes. Schema-enforced constraints are immune to context dilution. Keep only non-schema-expressible constraints \(subjective judgments, nuanced tone\) in natural language.
Journey Context:
Natural language constraints in system prompts decay with context length—they rely on the model 'remembering' them from thousands of tokens ago. Structured output constraints \(JSON schema, function calling schemas\) are enforced at the decoding level through constrained generation. The model physically cannot produce output that violates the schema. This makes them effectively drift-proof. The frontier practice in 2025 is to move as many constraints as possible from natural language to schema-level enforcement. This is the single highest-ROI intervention for format drift. The tradeoff: schemas are rigid and can't express nuanced constraints like 'be concise but thorough'—those still need prompt-level enforcement with all its drift vulnerability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:56:33.740870+00:00— report_created — created