What is few-shot prompting?
Few-shot prompting means giving the model a small number of solved examples before the real task. Zero-shot gives no examples (just the instruction); one-shot gives one; few-shot gives roughly two to five. The model reads the examples, infers the rule connecting inputs to outputs, and applies it to the new input.
This works because of in-context learning: the model adapts its behavior from the examples in the prompt without any weight updates. Brown et al., 2020 (arXiv:2005.14165) demonstrated that this alone could match task-specific tuning on many benchmarks. For when examples help versus when zero-shot is enough, see our multi-shot vs. zero-shot guide.
Few-shot shines when the task is hard to describe in words but easy to show: a specific output format, a particular tone, a classification with fuzzy boundaries, or an extraction pattern.