Concept
Few-shot
Solving a task with a handful of demonstrations included directly in the prompt.
Definition
Few-shot prompting embeds a few (typically 2â16) labelled examples in the input before the test query. The model imitates their format and reasoning style â no weights are updated. It is the workhorse pattern when zero-shot quality is insufficient but fine-tuning is overkill.
Common use cases
- Classification
- Format imitation
- Code style transfer