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
Few-Shot LearningIn 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.
Frequently asked questions
What is 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.
Sources
Related terms
← Full AI & prompt engineering glossary
Put Few-Shot Learning to work with Prompeteer, the Agentic Contextual AI Platform →