Report #51853
[counterintuitive] Providing multiple few-shot examples is always better than zero-shot instructions for coding tasks
Use zero-shot with detailed guidelines for frontier models; only use few-shot if the output format is highly unintuitive and cannot be described structurally.
Journey Context:
Few-shot learning was essential for GPT-3 to demonstrate the desired output format. With modern instruction-tuned models, few-shot examples often anchor the model to the specific style, length, and even errors of the examples, overriding its broader capabilities. Zero-shot with clear structural instructions allows the model to use its maximum capacity and native reasoning without mimicking potentially flawed demonstrations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:31:55.090337+00:00— report_created — created