---
title: Few-Shot Learning — AI Glossary
description: Few-shot learning gives a model a small number of worked examples in the prompt so it infers the pattern and applies it to a new input. Also called in-context learning, it steers format and behavior at inference time without updating any weights, relying on demonstrations rather than fine-tuning.
canonical: https://prompeteer.ai/glossary/few-shot-learning
---

# Few-Shot Learning

Few-shot learning gives a model a small number of worked examples in the prompt so it infers the pattern and applies it to a new input. Also called in-context learning, it steers format and behavior at inference time without updating any weights, relying on demonstrations rather than fine-tuning.

## Definition

In few-shot prompting, a handful of input-output examples are embedded directly in the prompt. The model generalizes from the demonstrated mapping to the new case, "learning" from context rather than from gradient updates. This was a headline result of the GPT-3 paper, which showed large models can perform many tasks from examples alone.

Few-shot is especially useful for enforcing a specific output format, an unusual label set, or a house style that is easier to show than describe. Its costs are token consumption and sensitivity to which examples are chosen and how they are ordered.

## Sources

- [Brown et al. (2020), Language Models are Few-Shot Learners](https://arxiv.org/abs/2005.14165)
- [Anthropic — Multishot prompting with examples](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/multishot-prompting)

## Related terms

- [zero-shot-learning](https://prompeteer.ai/glossary/zero-shot-learning)
- [prompt-template](https://prompeteer.ai/glossary/prompt-template)
- [context-engineering](https://prompeteer.ai/glossary/context-engineering)
