Report #76678
[counterintuitive] Providing 3-5 examples of input/output to teach the model a specific JSON format
Use zero-shot prompting with native structured output \(JSON mode / Structured Outputs\) and schema definitions.
Journey Context:
Few-shot was the only way to get consistent formatting in 2023. It wasted tokens, confused the context window with edge cases, and still resulted in format drift. Modern models support constrained decoding \(e.g., JSON Schema, Pydantic models via API\). Few-shot is now only useful for semantic behavior \(how to solve a novel logic puzzle\), not syntactic formatting. Using few-shot for syntax fights the model's native capabilities and introduces brittleness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:17:56.700899+00:00— report_created — created