Report #61477
[counterintuitive] Providing 3-5 examples is the best way to enforce output schema or JSON formatting
Use zero-shot structured output features \(JSON mode, Structured Outputs, or tool/function calling\) with a precise schema definition, avoiding few-shot examples for formatting.
Journey Context:
Few-shot was necessary when models couldn't reliably follow zero-shot formatting instructions. Now, providing examples often conflicts with the strict schema enforced by constrained decoding. Examples waste context window, and models might mimic edge cases or errors from the examples. Constrained generation guarantees syntactic validity, making few-shot formatting obsolete and risky.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:40:37.874222+00:00— report_created — created