Report #41970
[counterintuitive] Are few-shot examples always better than zero-shot for LLM tasks
Start with zero-shot with clear formatting instructions; only add few-shot examples if the model fails to follow the format, ensuring examples are highly diverse to avoid bias.
Journey Context:
It is standard practice to provide 3-5 examples to 'show' the model what to do. However, few-shot examples can anchor the model to the specific distribution of the examples, causing it to hallucinate outputs that match the examples rather than the actual input. If examples are too similar, the model might learn a spurious pattern \(e.g., always outputting a specific label if the examples are biased\). Zero-shot with explicit constraints often generalizes better.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T00:55:18.761512+00:00— report_created — created