Prompting

Few-shot Learning

A prompting technique where you include a handful of examples in the prompt so the AI learns the pattern you want it to follow.

01 ——

In plain English

Few-shot learning means giving an AI model a small number of examples (usually 2–10) inside the prompt, before asking it to do the task. The model picks up the pattern from your examples without any retraining — it just learns from context.

Example prompt:

Classify these reviews as positive or negative.
"Loved it" → positive
"Total waste of money" → negative
"Best purchase this year" → positive
"Wouldn't recommend" → ???

Why use it:

  • More reliable than zero-shot — the model knows exactly what format you want
  • No fine-tuning required — works at inference time
  • Fast iteration — change examples to change behaviour instantly

Few-shot prompting is one of the most reliable prompt-engineering techniques and is built into many production AI tools under the hood.

02 ——

Related terms

Back to glossaryLast reviewed May 2026
Vol. 4 · Issue 19 · Last reviewed 2026-05-30

Sign up for our newsletter

Receive weekly updates so you can stay up-to-date with the world of AI