Report #70100
[cost\_intel] Including 5-10 few-shot examples in every API call, silently bloating input tokens by 5-10x
For high-volume pipelines \(>1K calls/day\), replace static few-shot prompting with one of: \(a\) prompt caching if examples are static and the provider supports it, \(b\) dynamic example retrieval \(RAG over examples\) to send only 1-2 relevant examples per call, or \(c\) fine-tuning on the examples for tasks >50K calls/day. A 10-example few-shot prompt can add 2000-5000 tokens per call.
Journey Context:
Few-shot prompting is the default in tutorials and works well for prototyping. But in production at scale, those examples are sent with every single request and are billed as input tokens every time. At 10K requests/day with 3000 extra tokens of examples, that is 30M extra input tokens/day — $90/day on Sonnet \($3/M\) vs $9/day on Haiku \($0.25/M\) vs effectively $0.30/day with prompt caching \($0.30/M cached\). The fix depends on volume: under 1K calls/day, the cost is negligible and few-shot is fine. At 1K-50K calls/day, prompt caching or dynamic retrieval is the right call. Over 50K calls/day, fine-tuning a smaller model on those examples almost always wins on cost-per-quality-point because you internalize the examples into model weights and can use a cheaper model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:15:02.296183+00:00— report_created — created