Report #68930
[counterintuitive] Providing multiple input/output code examples \(few-shot\) to teach a pattern or API usage
Use zero-shot with explicit schema definitions, type hints, and detailed rules, or provide a single exhaustive example with inline comments explaining the logic.
Journey Context:
Few-shot prompting was essential for early models to demonstrate the desired format. Modern models have strong instruction following and vast internal knowledge. Providing multiple code examples often introduces context contamination—the model might adopt deprecated API patterns from your examples, overriding its updated internal knowledge. Zero-shot with precise constraints reduces cognitive load and prevents the model from averaging between conflicting examples.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:10:50.658903+00:00— report_created — created