In-context learning
- Definition
- A model's ability to learn new tasks from examples provided in the prompt, without any weight updates. In-context learning is what makes few-shot and zero-shot prompting work and is a defining feature of large language models.
- Why it matters
- In-context learning is the capability that makes LLMs economically revolutionary. Instead of training a separate model for each task (the pre-LLM paradigm), you can give a single model examples in the prompt and it adapts instantly. This collapses the cost of building a new AI feature from months of ML engineering to minutes of prompt design. The deeper implication is that LLMs are not just language models; they are general-purpose pattern matchers that can learn new behaviors at inference time. This is why context window size and context engineering matter so much: they directly determine how many examples and how much context you can provide for in-context learning.
- In practice
- Google's PaLM paper demonstrated that in-context learning ability scales with model size: 540B-parameter models showed in-context learning on tasks that 8B-parameter models could not. This motivated the push to larger models. In production, companies use in-context learning for rapid prototyping, A/B testing different prompt strategies, and handling long-tail use cases that do not justify fine-tuning. A common pattern: use in-context learning (few-shot) to validate a use case, then graduate to fine-tuning only for the highest-volume tasks where the per-token cost of including examples becomes significant.
We cover models & architecture every week.
Get the 5 AI stories that matter — free, every Friday.
Related terms
Few-shot prompting
Providing a model with a small number of examples in the prompt to guide its behavior, without any fine-tuning. Few-shot is a fast, low-cost way to adapt a general model to a specific task.
Zero-shot prompting
Asking a model to perform a task with no examples, relying entirely on its pre-trained knowledge and instruction-following ability. Zero-shot capability is a key measure of model generality and usability.
Context window
The maximum number of tokens a model can process in a single request, including both the prompt and the response. Larger context windows (100K-2M tokens) let models ingest entire codebases or documents at once.
Prompt engineering
The practice of crafting inputs to AI models to elicit desired outputs. Prompt engineering has become a critical skill and even a job title, though its importance may decrease as models improve at understanding intent.
Know the terms. Know the moves.
Get the 5 AI stories that matter every Friday — free.
Free forever. No spam.