In-Context Learning › ICL Scaling Behavior
Language AI HandbookAll chapters In-Context Learning › ICL Scaling BehaviorOne section · Sections in this chapter5 / 11 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
One of the most interesting aspects of in-context learning is how it scales. Both the number of examples and the model size affect performance, but the relationship is not simply additive.
More Examples Help (Up to a Point)
Adding more demonstrations generally improves performance, but with diminishing returns. The first few examples provide the largest gains, while additional examples contribute less.

The optimal number of examples depends on:
- Task complexity: Simple tasks need fewer examples
- Model capacity: Larger models extract more from each example
- Example quality: High-quality examples provide more information per demonstration
- Context budget: Longer examples leave less room for more demonstrations
Model Size Enables ICL
The most dramatic scaling effect is the relationship between model size and ICL capability. Small models show minimal benefit from demonstrations. As models grow larger, they become increasingly able to use in-context examples.

This emergence pattern changes the interpretation. It suggests that in-context learning represents a qualitatively different capability that activates at enough scale, rather than a smooth scaling up of pattern matching. Models below a certain threshold don't just do ICL poorly; they essentially don't do it at all.
The Interplay of Scale and Examples
Model size and example count interact in interesting ways. Larger models:
- Extract more information from each example
- Continue improving with more examples for longer
- Generalize better from diverse demonstrations
- Are more reliable to example ordering and selection

The practical takeaway: if you're working with a smaller model, investing heavily in example selection and count may not pay off. But with large models, careful prompt engineering with well-chosen examples can yield substantial gains.
