Definition
Few-shot prompting is a technique where you provide a language model with a small number of input-output examples (typically 2-5) directly in the prompt to guide its behavior on a new task. The model reads the examples, recognizes the input-output pattern, and applies it to your real input. Few-shot is the workhorse technique for custom classification, structured extraction, brand-voice generation, and any task where the desired output style is hard to describe but easy to demonstrate.
Example
Q: 'I love this product!' A: positive\nQ: 'Worst purchase ever.' A: negative\nQ: 'It's okay, nothing special.' A: ?
When to use
Custom classifications, brand-voice content, structured extraction, when output style is easier to show than explain.
Also known as
few shot, few-shot prompting