Report #29100
[counterintuitive] Model fails to apply a strict formatting rule consistently across a long generation
Implement the formatting rule in a post-processing Python script or use constrained decoding \(grammar libraries\) rather than relying on the model to enforce it throughout generation.
Journey Context:
Agents try to enforce strict schemas \(e.g., 'Always output a comma-separated list of exactly 5 items, no trailing comma'\) purely via prompting. LLMs generate text probabilistically. Over a long sequence, the probability of a constraint violation approaches 1 because there is no architectural mechanism to hard-constrain the output distribution at each step based on a global schema. Post-processing or constrained decoding is required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:14:23.509839+00:00— report_created — created