Learning Paradigms

few-shot learning

/ FYOO-shot LER-ning /

Show a child two or three pictures of a zebra and they can spot zebras forever after. They don't need ten thousand examples, because they already know about animals, stripes, and shapes — the new concept slots into a rich understanding they already have. Few-shot learning aims for the same: teaching a model a new category or task from just a handful of examples, often as few as one to five per class.

The trick is that the heavy lifting happened earlier. A few-shot system is built on top of a model that has already learned broadly — through pre-training, self-supervised learning, or meta-learning — so it carries strong general-purpose representations. Against that backdrop, a few examples are enough to point at the new thing rather than to define it from nothing. With large language models, this often appears as "in-context" few-shot learning: you put a few examples right in the prompt, and the model picks up the pattern on the spot, without any weights changing at all.

It is genuinely powerful where labeled data is scarce or expensive — rare diseases, niche languages, a new product with few photos. But be honest about why it works: it isn't learning from nothing, it's leaning hard on everything learned before. If the new task falls outside what the base model already understands, a few examples won't rescue it. And with so few examples, results are noisy — which particular handful you pick can swing the outcome a lot.

You want a language model to classify support tickets as "billing," "bug," or "feature request." Instead of fine-tuning, you write three labeled examples in the prompt — one of each — then the new ticket. The model reads the pattern from those three and labels the new one correctly. That is few-shot, in-context learning, with no retraining.

A few in-prompt examples teach the task without touching the weights.

Few-shot learning is not learning from scratch — it borrows heavily from broad prior training. If the task lies outside what the base model already knows, no handful of examples will fix it.

Also called
few-shot少样本学习少樣本學習low-shot learning