What is few-shot prompting? Definition, examples
Few-shot prompting means including a few solved examples of the task in the prompt, each an input followed by the expected output, before giving the model the real case. The model takes its cue from them for format, tone and how to settle borderline calls, with no retraining at all. With no examples it is called zero-shot; with exactly one, one-shot.
Definition written by Alex Dionisio, Senior Product Manager. Updated November 13, 2026.
Why it matters for a PM
Describing a style or a labeling rule precisely is often harder than showing it. A few well chosen examples make outputs more consistent and help the model on ambiguous inputs. For a PM, it is also a specification tool: picking the examples forces the team to agree on what a good answer looks like, edge cases included.
Example
A tool sorts customer feedback into "bug," "feature request" or "question." With instructions alone, the model files "I can't find the PDF export" sometimes as a bug, sometimes as a request. The team adds four annotated examples, including this one, labeled "question" because the export already exists. Labeling becomes clearly more consistent on the test set.
Key points
- Examples steer both the output format and the judgment on hard cases.
- They need to be varied and representative, or the model copies a detail instead of the rule.
- Every example adds tokens to every call, so a few targeted ones beat a long list.
- It helps to separate the examples clearly from the real input, for instance with tags.
Common mistakes
- Providing examples that are all alike, which the model then mimics too closely.
- Using real customer data as examples without anonymizing it.
- Keeping examples that contradict the written instructions in the prompt.
Go further with Module
The courses and lessons that cover this concept:
Guides on this topic
- RAG vs fine-tuning: how to choose
What each approach solves, the decision criteria and how to evaluate, with a decision grid.
- Evaluating an AI feature (evals)
Test cases, criteria, LLM-as-a-judge, release thresholds and monitoring, with an evals plan.