Number of Examples: Diminishing Returns
What You'll Learn
You'll understand why adding more examples to few-shot prompts gives less benefit after the first few, and how to find the sweet spot between performance and context limits.
The Diminishing Returns Curve
When crafting few-shot prompts, you might assume that more examples always mean better performance. In practice, the relationship isn't linear—it follows a diminishing returns pattern.
The typical pattern:
- 1 example: Significant improvement over zero-shot
- 2-3 examples: Noticeable gains continue
- 4-5 examples: Smaller incremental improvements
- 6+ examples: Minimal or no additional benefit
Think of it like studying for an exam: the first hour of studying helps tremendously, the second hour helps quite a bit, but by your fifth hour you're mostly reinforcing what you already know rather than learning much new material.
Why This Happens
Large language models are pattern-matching systems. After seeing 3-5 well-chosen examples, the model has usually grasped:
- The input-output format
- The task structure
- The expected tone and style
- Key edge cases (if examples are diverse)
Additional examples become redundant—they don't teach the model anything fundamentally new about the task.
Practical Implications
Context windows have token limits (e.g., 4K, 8K, 128K tokens). Each example consumes precious space that could be used for:
- Your actual query
- Retrieved documents
- System instructions
The optimization problem: Find the minimum number of examples that achieve near-maximum performance, leaving room for other prompt components.
Most practitioners find 3-4 carefully selected examples hit the sweet spot, balancing strong performance with efficient context usage.
Key Takeaway: Few-shot performance typically plateaus after 3-5 examples; prioritize example quality and diversity over quantity to maximize context window efficiency.