Few-Shot Prompting
Few-shot prompting is the technique of including a small number of worked examples, each showing an input and the desired output, directly in your prompt, so the AI model imitates the demonstrated pattern rather than guessing what you want. Instead of describing your ideal ticket summary in the abstract, you show it three tickets with three model summaries and then present the fourth ticket. “Zero-shot” means no examples, just instructions; “one-shot” means a single example; “few-shot” typically means two to five.
It works because large language models are pattern completers: concrete demonstrations pin down tone, length, structure, labels, and edge-case handling far more precisely than adjectives ever do. Few-shot prompting is one of the core tools of prompt engineering, and it sits on a spectrum with fine-tuning: examples in the prompt teach a pattern per request with zero setup, while fine-tuning bakes patterns into the model itself, worth it only when the pattern is stable, high-volume, or too big to fit in a prompt.
The trade-offs are modest: examples consume tokens on every request (cost and latency), and models imitate faithfully, including any flaws, biases, or inconsistencies in the examples you chose. Curate them like specifications, not throwaways.
Why it matters at work
Most “the AI keeps formatting this wrong” complaints at work dissolve with two or three good examples. Few-shot prompting is how teams get consistent classifications (“map each expense to one of these categories, here are five labeled cases, including one ambiguous one”), consistent tone in drafted replies, and consistent structure in generated reports, without any engineering, retraining, or new tooling.
A work example
A finance team’s expense-categorization prompt includes four labeled examples, one obvious, two typical, and one tricky (“client dinner with internal staff present → Client Entertainment”), and miscategorization complaints from month-end review drop noticeably.
Related terms
- Prompt engineering, the broader craft few-shot prompting belongs to
- Fine-tuning, the heavier alternative when patterns are stable and high-volume
Get one practical AI-at-work idea in your inbox each week, subscribe to the AI Work+ newsletter.
FAQ
How many examples should a few-shot prompt include? Usually two to five well-chosen ones. Quality and variety matter more than count, and every example adds tokens, and therefore cost, to each request.
When is few-shot prompting better than fine-tuning? When you need a specific format or style quickly and cheaply. Fine-tuning suits high-volume, stable tasks; few-shot examples can be swapped in minutes without training anything.