Report #83024
[counterintuitive] Providing multiple few-shot examples is the best way to ensure format and accuracy
Use zero-shot with native structured output \(JSON schema\) for formatting; reserve few-shot only for highly idiosyncratic logic that zero-shot consistently misses.
Journey Context:
Few-shot was essential for GPT-3. With modern instruction-tuned models, few-shot examples can actually constrain the model to the style and errors of the examples. If you provide 3 mediocre examples, the model will output mediocre code. Zero-shot with strict schema enforcement leverages the model's full training distribution, yielding higher quality and preventing style mimicry.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:56:37.472605+00:00— report_created — created