Report #81530
[counterintuitive] Providing multiple full code examples \(few-shot\) to teach the model a new pattern or API
Use zero-shot with explicit schemas/types or single-shot with a minimal skeleton, because modern models have strong in-context learning and few-shot examples often constrain them to the specific style/bugs of the examples.
Journey Context:
Few-shot was essential for base models like GPT-3. With modern instruction-tuned models, few-shot examples can anchor the model too heavily to the provided examples, mimicking their flaws, outdated APIs, or specific stylistic quirks. Zero-shot with clear type definitions or a single canonical example is more efficient and avoids 'example contamination' where the model blindly copies the example's structure even when inappropriate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:27:00.266009+00:00— report_created — created