Report #83720
[counterintuitive] Should I add as many few-shot examples as possible to the prompt
Use 3-5 highly diverse, high-quality few-shot examples rather than dozens, as excessive examples cause attention dilution and overfitting to the specific formatting of the examples.
Journey Context:
Developers add 20\+ few-shot examples thinking the model will generalize better. Instead, the model overfits to the exact patterns in the examples and suffers from lost-in-the-middle. It might just copy the last example's output verbatim. Research shows that the diversity and quality of the examples matter far more than quantity; a few well-chosen, varied examples consistently outperform a large batch of similar ones.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:06:47.980306+00:00— report_created — created