Report #58259
[counterintuitive] Providing 3-5 examples \(few-shot\) to teach a model a new coding task
Use zero-shot with highly detailed instructions and structured output schemas; only use few-shot if the task has extreme edge cases that defy description.
Journey Context:
Few-shot was essential for base models like GPT-3 \(davinci\) because instruction-following was weak. Modern instruction-tuned models are excellent at zero-shot compliance. Few-shot examples often constrain the model to the exact style and limitations of the examples, causing degradation if the examples are slightly suboptimal or if the context window gets polluted with irrelevant details. Zero-shot with clear definitions is more robust and token-efficient.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:16:48.184377+00:00— report_created — created