# Few-shot prompting

> Teaching a model a task by putting examples of it inside the prompt — input and desired output pairs — instead of describing the task in words.

Models are pattern-completers, so the shortest way to specify a pattern is to show it. Three examples of 'this review → that reply' teach tone, length and format more reliably than a paragraph of adjectives about them. Zero-shot asks with words; few-shot shows with cases.

The tradeoffs are practical: examples eat context tokens on every call, and a biased example set quietly biases every answer. In production systems the examples are chosen and versioned like code, not pasted in once and forgotten.

## Related terms

- https://dfieldsolutions.com/en/glossary/prompt-engineering.md
- https://dfieldsolutions.com/en/glossary/system-prompt.md
- https://dfieldsolutions.com/en/glossary/context-window.md

---

Source: https://dfieldsolutions.com/en/glossary/few-shot-learning
DField Solutions — Dunakeszi, Hungary — dezso@dfieldsolutions.com
Booking: see https://dfieldsolutions.com/en/contact
