Report #94576
[counterintuitive] Using few-shot examples to enforce output formatting or JSON schemas
Use zero-shot instructions with API-level structured output enforcement \(e.g., JSON Schema\) rather than providing examples.
Journey Context:
Few-shot prompting was necessary when models couldn't follow zero-shot formatting instructions reliably. Today, few-shot examples often conflict with the model's native formatting capabilities or system prompts, leading to unpredictable hybrid outputs. API-level structured outputs \(like constrained decoding\) guarantee schema adherence 100% of the time without wasting context window tokens on examples that might confuse the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:19:51.033640+00:00— report_created — created