Few-shot Prompting
Also called k-shot prompting, in-context examples.
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.
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." ->Sources
- Brown et al. (2020). Language Models are Few-Shot Learners.
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/
BibTeX
@misc{protologue_few_shot_prompting,
title = {Few-shot Prompting},
author = {{Protologue}},
year = {2026},
howpublished = {Protologue: A Taxonomy of Prompting and LLM Techniques, v1.0.0},
note = {Entry PTL-0009},
url = {https://protologue.com/t/few-shot-prompting/}
}