Report #36113
[counterintuitive] Providing few-shot examples is the best way to teach a model a new coding pattern
Use zero-shot with precise instructions and structured schemas first; only use few-shot if the task is highly stylized and impossible to describe formally.
Journey Context:
Few-shot was essential for GPT-3 to demonstrate the desired output format. With modern instruction-tuned models, few-shot often anchors the model too heavily to the provided examples, reducing its ability to generalize to edge cases not represented in the 2-3 examples you provided. It also consumes vast context windows. Zero-shot with clear definitions and tool schemas leverages the model's pre-trained knowledge more flexibly and avoids example overfitting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:05:21.535656+00:00— report_created — created