Last updated: April 5, 2026 · Prompting & Usage · by Daniel Ashford

What is Few-Shot Prompting?

QUICK ANSWER

Providing examples of desired input-output pairs in the prompt.

Definition

Few-shot prompting includes several examples of desired input-output pairs in the prompt before the actual task. These examples demonstrate the expected format and reasoning style, allowing the model to pattern-match.

How It Works

Zero-shot means no examples, one-shot means one, few-shot typically means 2-5. Few-shot is especially effective when the desired output format is specific. Choose examples that are diverse, correct, and representative. Few-shot consumes more input tokens.

Example

To classify tickets: "Example 1: 'My card was charged twice' → billing. Example 2: 'App crashes on login' → technical. Now classify: 'I need a refund' →"

Related Terms

Prompt Engineering
The skill of crafting effective prompts to get the best results from an LLM.
Prompt
The text input you send to an LLM to get a response.
System Prompt
Persistent instructions that define how the model should behave.

See How Models Compare

Understanding few-shot prompting is important when choosing the right AI model. See how 12 models compare on our leaderboard.

View Leaderboard →Our Methodology
← Browse all 47 glossary terms
DA
Daniel Ashford
Founder & Lead Evaluator · 200+ models evaluated