Report #38211
[counterintuitive] Providing 3-5 examples \(few-shot\) is the best way to teach a model a new coding pattern or output format
Use zero-shot with explicit schema definitions \(JSON mode, Pydantic schemas, or Zod\) and detailed instructions. Reserve few-shot only for highly stylistic or subjective tasks where schema alone cannot convey the nuance.
Journey Context:
Few-shot was essential when models struggled with zero-shot instruction following. Modern models have massive context windows and strong instruction-following. Few-shot examples often lock the model into the exact structure of the examples, causing it to hallucinate edge cases that match the examples rather than following the actual rules. Zero-shot with strict schemas is more robust and saves tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:37:00.240296+00:00— report_created — created