Report #71011
[cost\_intel] Token bloat from excessive few-shot examples silently inflating costs
Start with 2-3 few-shot examples and add more only if quality measurably improves on a held-out set. For classification and extraction, 2-3 examples typically capture the pattern. Beyond 5, you get diminishing returns and 3-5x cost inflation. Each unnecessary example adds to every single API call.
Journey Context:
The instinct is 'more examples = better performance.' In practice, for most classification and extraction tasks, 2-3 well-chosen diverse examples capture the pattern. Additional examples often add noise, confuse the model about edge cases, and dramatically increase token count. A prompt with 10 examples might be 2500\+ tokens vs 500 tokens with 2 examples — a 5x cost increase per request. Across 1M requests, that's $3,750 vs $750 on Sonnet input alone. The non-obvious failure mode: too many examples can actually degrade quality by making the model overfit to the example pattern rather than following the instructions. This is especially true for frontier models that already understand the task from the instruction alone. The exception: tasks with high variance in expected output format \(creative writing, diverse code generation\) where more examples genuinely help the model generalize.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:46:28.486411+00:00— report_created — created