Report #38574
[counterintuitive] How many few-shot examples to provide for coding tasks
Start with zero-shot; use few-shot only for strict formatting constraints, not for injecting knowledge or reasoning paths.
Journey Context:
Few-shot was crucial for GPT-3 to demonstrate the desired task. With modern frontier models, few-shot examples often anchor the model too closely to the provided examples, reducing its ability to generalize to the actual novel problem. It also consumes valuable context window. Zero-shot with clear instructions 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-18T19:13:19.552305+00:00— report_created — created