# Few-shot Prompting

> Few-shot prompting includes a small number of input-output examples in the prompt so the model can infer the task and the desired format from demonstrations.

- Identifier: PTL-0009
- Category: Foundations
- Canonical URL: https://protologue.com/t/few-shot-prompting/
- Also known as: k-shot prompting, in-context examples
- Introduced: 2020

## Description

Popularized by the GPT-3 paper, it allows a model to perform new tasks without any weight updates. Results are sensitive to which examples are chosen, their order, and their label balance, which spawned a body of work on exemplar selection and calibration.

## Example

```
Classify sentiment.
Review: "Arrived broken." -> negative
Review: "Works perfectly." -> positive
Review: "Battery died in a day." ->
```

## Broader terms

- [In-Context Learning](https://protologue.com/t/in-context-learning/)

## Narrower terms

- [Exemplar Selection](https://protologue.com/t/exemplar-selection/)
- [Exemplar Ordering](https://protologue.com/t/exemplar-ordering/)
- [Few-shot Calibration](https://protologue.com/t/few-shot-calibration/)

## Related terms

- [Zero-shot Prompting](https://protologue.com/t/zero-shot-prompting/)
- [Many-shot In-Context Learning](https://protologue.com/t/many-shot-in-context-learning/)

## Sources

- Brown et al. (2020). Language Models are Few-Shot Learners. https://arxiv.org/abs/2005.14165

## Cite this entry

Protologue. (2026). Few-shot Prompting. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.0.0, PTL-0009). https://protologue.com/t/few-shot-prompting/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
