What is few-shot prompting?
A few-shot prompt has three parts: a short instruction, a set of examples, and the new input. Each example shows the model a complete input and the exact output you'd accept. By the time the model reaches the real input, it has a concrete template to match rather than an abstract description to interpret.
The terms map to example counts: zero-shot is no examples, one-shot is a single example, and few-shot is roughly two to five. Above five examples you usually hit diminishing returns — the pattern is already clear and extra examples mostly add tokens. The core idea traces to Brown et al. 2020 (arXiv:2005.14165).
The reason few-shot beats a prose description for format-sensitive tasks is simple: it's far easier for a model to copy a shape it can see than to reconstruct one from words. "Return JSON with keys label and confidence" is ambiguous; two examples showing exactly that JSON are not.