← Dictionary
Prompting·intermediate

Few-shot prompting

Show examples instead of explaining. The AI continues the pattern.

When a task is easier to demonstrate than to explain, give examples:

Classify these movie reviews.

"Loved every minute" → positive "Waste of two hours" → negative "The soundtrack saved it" → mixed

"I wanted to like it but the pacing killed it" →

The model sees the pattern in your examples and continues it. Two to five examples usually beats a paragraph of instructions. That's few-shot prompting — you're giving the model a few shots at seeing what you mean.

Zero-shot is the opposite. No examples, just the instruction. Few-shot is almost always stronger when the task involves a specific format, style, or judgment call.

Related