Report #24832
[counterintuitive] Few-shot vs zero-shot prompting for coding tasks
Use zero-shot with clear schemas or tool definitions. If few-shot is needed, use 1 high-quality example or dynamic few-shot retrieval \(RAG\) rather than static examples.
Journey Context:
Few-shot was essential for GPT-3. With instruction-tuned models, few-shot often confuses the model if examples are slightly off the target task or use outdated APIs. It wastes context window. Research shows models learn the \*format\* from few-shot, not the \*facts\*.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:05:30.299011+00:00— report_created — created