Few-shot prompting
Also called few-shot learning, in-context learning, one-shot prompting
Showing the model two or three examples of the task done well before asking it to do a new one.
Few-shot prompting means including a small number of examples in the prompt, each showing an input and the output you want. The model picks up the pattern from these examples and applies it to a new input. With one example it is called one-shot; with none, zero-shot.
Examples communicate things that are hard to describe in words: a tone of voice, an exact format, how long answers should be, or how to handle a borderline case. They are especially useful for classification with custom labels, extraction into a fixed structure, and matching a writing style.
The quality of the examples matters more than the number. Two to five good ones usually beat twenty mediocre ones. Choose examples that are varied, cover the tricky cases, and are clearly separated from the real input, for example with labels or tags. Researchers call this in-context learning, because the model adapts within the prompt without any change to its weights.
Example
To label feedback as Bug, Feature request or Praise, you add three labelled lines to the prompt: "App crashes when I upload a photo: Bug", "Please add dark mode: Feature request", "Love the new search: Praise". Then you give the new feedback and ask for its label.
Common mistake
Using examples that are all alike. If every example review is short and positive, the model may assume all reviews should be labelled positive or answered briefly. Vary length, topic and answer across your examples so the model learns the rule, not a coincidence.