Report #55736
[counterintuitive] Providing few-shot examples primarily to enforce output formatting or JSON structure
Use zero-shot prompting combined with API-level constrained decoding \(Structured Outputs/JSON Schema\) to enforce formatting. Reserve few-shot only for demonstrating complex logic or edge-case behavior.
Journey Context:
In the GPT-3 era, few-shot was the only way to get structured output. With modern instruction-tuned models and constrained decoding, few-shot examples for formatting are obsolete and actively harmful. Few-shot examples often conflict with the system prompt or schema, and models will mimic the exact flaws or truncations in your examples. API-level Structured Outputs guarantees 100% valid JSON and schema adherence at the token level, making few-shot formatting a waste of tokens and a source of fragility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:02:41.026309+00:00— report_created — created