Few-Shot Learning
Last Updated: July 29, 2026 | By Mihail Sebastian | AI Dictionary
A model's ability to learn a new task from only a handful of labeled examples, instead of the thousands a model trained from scratch would need.
What is Few-Shot Learning?
Few-shot learning is a model’s ability to learn a new task from only a handful of labeled examples, instead of the thousands that training from scratch requires. Labeled data is the expensive part of machine learning: rare diseases have few scans, new products have no support history.
Few-shot methods work where the data never will be plentiful – and with large language models, “few-shot” also names the practice of putting worked examples directly in the prompt.
How Few-Shot Learning Works
Two mechanisms dominate. In classic machine learning, models learn to compare rather than memorize. Meta-learning trains a model across many small tasks so it adapts to new ones quickly; metric-based methods such as Siamese networks learn a similarity function and match new inputs against a few stored examples.
With large language models, few-shot learning happens in the prompt. Show the model three worked examples of a task and it follows the pattern on the fourth – no weights change, no training run.
Both routes lean on a pretrained model. The few examples steer knowledge the model already has; they do not teach it from nothing.
Few-shot vs Zero-shot Learning
The practical difference is the number of examples: few-shot gives the model a handful, zero-shot learning gives it none. Few-shot examples calibrate the model on real inputs and outputs; zero-shot relies entirely on descriptions or instructions.
| Few-shot learning | Zero-shot learning | |
|---|---|---|
| Examples of the new task | A handful | None |
| What the model relies on | The examples given, plus prior knowledge | Descriptions, attributes, or instructions |
| When to use it | A few labels are available or cheap to create | No labeled data exists |
| Typical accuracy | Higher; examples pin down the expected output | Lower; hinges on how well the description fits |
Example of Few-Shot Learning
A finance team wants dates, vendors, and totals pulled out of scanned receipts. They paste three receipts into a language model’s prompt, each followed by the correctly extracted fields.
Then they append a fourth receipt. The model matches the pattern and returns that receipt’s fields in the same format. Three examples replaced the labeled dataset a purpose-built extraction model would have needed.
Related AI terms: Zero-shot Learning · Fine-tuning · Transfer Learning · Pretrained Model
Did you like the Few-Shot Learning gist?
Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.
Mihail Sebastian — Writes about AI governance, regulation, and the technology behind them. Placeholder bio — replace with a real credential line. About