One-shot vs Few-shot Prompting
By putting a few examples inside your prompt, you show the AI exactly the pattern to follow. One example is one-shot. A few examples is few-shot.
This is a simple learning demo. The AI outputs below are predefined to show the idea, not a real AI model.
Show, don't just tell
In the last lesson you asked the AI to do a task with no examples (zero-shot). That works great for common tasks. But when a task is unusual, or you need a very specific answer format, plain instructions can miss.
The fix is simple: put examples right inside the prompt. Each example shows the model the exact input → output pattern you want. Give one example and it is one-shot. Give a few and it is few-shot.
One idea, three amounts of help
Remember, a "shot" is one example. The only thing that changes below is how many examples you include before the real question.
Classify this ticket:
"I cannot login"
"App keeps crashing"
→ Technical Issue
Classify this ticket:
"I cannot login"
"App keeps crashing"
→ Technical Issue
"Refund not received"
→ Billing
"Change my address"
→ Account Access
Classify this ticket:
"I cannot login"
Examples remove the guesswork
An instruction says what to do. An example also shows how the answer should look. That extra clarity helps the model in three ways:
Add examples and watch the answer improve
The AI must sort this new ticket into the right team. Right now it has no examples, so it is guessing. Click “+ Add example” to show it how similar tickets were handled, and watch its answer get sharper.
Reach for one-shot / few-shot when…
Examples are not free
- • A "shot" is one example inside the prompt.
- • One-shot = 1 example, few-shot = a few examples.
- • Examples show the model the format, categories, and style you want.
- • More (good) examples usually means a clearer pattern and steadier answers.
- • Start zero-shot, then add examples only when you need them.