What is few-shot prompting's cost, and when should you avoid it?
Quick-fire answer from the Awesome Generative AI Guide (MIT)
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Every example you include is input tokens on every call, so few-shot raises cost and latency and eats context budget. Avoid or trim it when a capable model already handles the task zero-shot, when the examples are long, or when you can move the pattern into a fine-tune or a schema instead. If you do use it, choose examples that cover the tricky and edge cases rather than easy ones, and check whether 2 well-chosen examples beat 8 mediocre ones. With prompt caching, a stable few-shot block can be cheaper on repeated calls, which changes the tradeoff.
Full worked answer
Every example you include is input tokens on every call, so few-shot raises cost and latency and eats context budget. Avoid or trim it when a capable model already handles the task zero-shot, when the examples are long, or when you can move the pattern into a fine-tune or a schema instead. If you do use it, choose examples that cover the tricky and edge cases rather than easy ones, and check whether 2 well-chosen examples beat 8 mediocre ones. With prompt caching, a stable few-shot block can be cheaper on repeated calls, which changes the tradeoff.
Learn more: Prompting topic
What a good answer covers
- Every example you include is input tokens on every call, so few-shot raises cost and latency and eats…
- Avoid or trim it when a capable model already handles the task zero-shot, when the examples are long, or…
- If you do use it, choose examples that cover the tricky and edge cases rather than easy ones, and check…
- With prompt caching, a stable few-shot block can be cheaper on repeated calls, which changes the tradeoff
Key terms: Learn more
In the glossary: Few-shot · Zero-shot · Prompt caching
Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep