Report #58462
[counterintuitive] Using few-shot examples to teach the model a specific output syntax or JSON schema
Use zero-shot prompting with native structured output features \(JSON Mode, Structured Outputs, Pydantic schemas\). Reserve few-shot examples strictly for demonstrating behavioral edge cases or complex decision boundaries.
Journey Context:
In 2023, few-shot was the primary way to get a model to output valid JSON. It was brittle, token-heavy, and prone to drift if examples weren't perfectly curated. With the advent of constrained decoding and structured outputs, the model's sampler is mathematically forced to adhere to a schema. Using few-shot for syntax now wastes context window and introduces conflicting signals if the model's internal representation of the schema differs slightly from the examples.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:37:03.964429+00:00— report_created — created