Report #24179
[counterintuitive] Providing multiple full few-shot examples to teach a coding pattern
Use zero-shot with clear instructions and a single detailed example only if demonstrating a complex output format; rely on the model's pre-trained knowledge for standard patterns.
Journey Context:
Few-shot prompting was essential for GPT-2/GPT-3 to demonstrate the desired task. With modern instruction-tuned models, zero-shot is often superior because few-shot examples can constrain the model to the exact style/limitations of the examples, overriding its better internal knowledge. If you must use examples, use 1-shot for format alignment, not for teaching the concept. Modern models are smart enough that zero-shot plus constraints outperforms few-shot, which can cause distribution drift.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:59:30.569830+00:00— report_created — created