Zero-shot prompting gives the model instructions only. Few-shot prompting adds a few worked examples that show an input and the output you want.
Classify the review sentiment as positive or negative.
Review: "Battery died within an hour."
Sentiment: negative
Review: "Setup took two minutes."
Sentiment: positive
Review: "The screen scratches easily."
Sentiment:
| Zero-shot | Few-shot | |
|---|---|---|
| Prompt content | Instructions only | Instructions plus 2-5 example pairs |
| Cost per call | Shorter and cheaper | Examples are resent on every call |
| Best for | Tasks you can describe in words | Formats or judgment calls easier to show |
Start zero-shot. Instruction-tuned models handle common, clearly described tasks without examples, and the shorter prompt is cheaper.
Add examples when a written instruction cannot pin down what you want: an exact output shape, a house tone, or a fuzzy label boundary.
Examples also steer strongly. A skewed mix of labels biases predictions, and the model may copy wording from your examples.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓