Report #84331
[counterintuitive] Always providing few-shot examples to guarantee correct output formatting
Use zero-shot with API-level structured outputs \(JSON schema\) first; only use few-shot for complex semantic patterns, not for formatting.
Journey Context:
Few-shot prompting was the primary tool for forcing models into specific formats before constrained decoding existed. With modern Structured Outputs \(JSON mode, function calling\), the API guarantees the schema at the decoding level. Providing few-shot examples for formatting now wastes context window and can cause conflicts if the example schema drifts from the API schema. Few-shot is still useful for teaching style or semantic classification, but obsolete for formatting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:08:39.701209+00:00— report_created — created