Last updated: April 5, 2026 · Prompting & Usage · by Daniel Ashford
What is Few-Shot Prompting?
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
See How Models Compare
Understanding few-shot prompting is important when choosing the right AI model. See how 12 models compare on our leaderboard.