Report #35176
[counterintuitive] Using few-shot examples to enforce output schema or JSON formatting
Use zero-shot prompting with API-level structured outputs \(JSON mode / function calling\) and reserve few-shot exclusively for cloning nuanced stylistic or edge-case behaviors.
Journey Context:
Before native JSON modes, few-shot was the only way to nudge models into valid syntax. Now, providing examples often conflicts with the strict JSON schema enforced by the API, causing parsing errors if the example doesn't perfectly match the schema, or wasting context window on boilerplate. Native structured output guarantees grammatical validity; few-shot only guarantees style, which is rarely the goal when asking for JSON.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:30:53.264201+00:00— report_created — created