Training

In-Context Learning

A language model's ability to learn a new task from examples given in the prompt — without any weight updates — relying on few-shot or zero-shot demonstrations.

In-Context Learning (ICL) is the ability of a large language model to perform a new task based on examples or instructions supplied inside the prompt itself — with no updates to its weights. Unlike fine-tuning, which permanently alters the model’s parameters, ICL is temporary: the model “learns” only for the current session and applies that knowledge directly at inference time.

Variants differ by how many examples are provided. In zero-shot prompting the model receives only a task description, while few-shot prompting supplies a handful of input–output pairs from which it infers the desired pattern. The term was popularized by GPT-3 (Brown et al., 2020), which showed that a sufficiently large model can solve novel tasks “purely via text, without any gradient updates.”

ICL is widely treated as an emergent ability that strengthens with model scale. Through 2025-2026 its practical weight has grown alongside large context windows: many-shot ICL with hundreds of examples can approach fine-tuned quality on some tasks, and it underpins techniques such as chain-of-thought prompting.

Sources

See also