Glossary · Definition
Few-shot prompting
Few-shot prompting includes 1-5 examples of desired input-output pairs in your prompt to guide the AI's response style or format. Beats zero-shot for tasks where format matters.
Definition
Few-shot prompting includes 1-5 examples of desired input-output pairs in your prompt to guide the AI's response style or format. Beats zero-shot for tasks where format matters.
What it means
Zero-shot: just the task description. Few-shot: task description + 1-5 examples + your input. Examples should be representative and diverse — not just easy cases. Frontier models in 2026 are zero-shot capable on most tasks but few-shot still wins on: format-specific output (JSON schemas, custom formats), domain-specific style (legal memos, technical writing), and edge-case behavior.
Advertisement
Why it matters
Few-shot examples are one of the cheapest ways to dramatically improve output quality. They're cached on most providers (~10% of input cost), so investing in 3 great examples is essentially free after the first call. The biggest mistake: using only easy examples — include hard / edge cases too.
Related free tools
Frequently asked questions
How many examples?
1-3 for most tasks; 5-7 for complex format requirements. Past 10, returns plateau and you should consider fine-tuning.
Few-shot vs fine-tuning?
Few-shot for style/format control (5-min experimentation). Fine-tuning when you've maxed out few-shot or need to bake in domain knowledge.
Related terms
- DefinitionSystem promptA system prompt is the persistent instruction sent to an LLM before user messages. It defines the AI's role, style, behavior, and constraints. Cached on most providers, so investing in a good one is cheap.
- DefinitionFine-tuningFine-tuning is the process of further training a pretrained model on your specific data, baking in style, format, or domain knowledge that's hard to achieve with prompting alone.