Report #66383
[counterintuitive] Providing multiple few-shot examples is always better than zero-shot for coding tasks
Default to zero-shot with detailed instructions; only use few-shot if you need to demonstrate a highly specific, non-standard output format.
Journey Context:
In 2023, few-shot was necessary to teach the model the desired format. With modern instruction-tuned models, few-shot examples often conflict with the system prompt or the model's internal alignment, leading to degraded performance \(the 'distractibility' problem\). Models overfit to the few-shot examples and lose generalization or fail to follow explicit instructions that contradict the examples. Zero-shot with clear constraints leverages the model's native capabilities better.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:54:23.659812+00:00— report_created — created