711
Dictionary

Few-Shot Prompting

Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern.

1 min readupdated 2026-06-22

/ quick answer

Few-shot prompting teaches the model by example rather than by instruction. Include input/output pairs in the prompt; the model generalises the pattern to your new input. Cheap alternative to fine-tuning for structured tasks. Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern.

Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern. Few-shot prompting teaches the model by example rather than by instruction. Include input/output pairs in the prompt; the model generalises the pattern to your new input. Cheap alternative to fine-tuning for structured tasks. In practice: For product-name classification: give 3 examples ('iPhone 15 → phone', 'MacBook Air → laptop', 'AirPods → audio') then ask 'iPad Pro →'.
Definition
Few-shot prompting teaches the model by example rather than by instruction. Include input/output pairs in the prompt; the model generalises the pattern to your new input. Cheap alternative to fine-tuning for structured tasks.
Example
For product-name classification: give 3 examples ('iPhone 15 → phone', 'MacBook Air → laptop', 'AirPods → audio') then ask 'iPad Pro →'.
Related Prompts

/ frequently asked

What is Few-Shot Prompting?

Few-shot prompting teaches the model by example rather than by instruction. Include input/output pairs in the prompt; the model generalises the pattern to your new input. Cheap alternative to fine-tuning for structured tasks.

What is an example of Few-Shot Prompting?

For product-name classification: give 3 examples ('iPhone 15 → phone', 'MacBook Air → laptop', 'AirPods → audio') then ask 'iPad Pro →'.

Why does Few-Shot Prompting matter?

Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern.

What should I learn after Few-Shot Prompting?

Open the related workflows and prompts further down this page: they show how this idea is applied in a real task, step by step.

/ continue exploring

Related concepts

The vocabulary this page depends on.

all dictionary →

Related workflows

Turn this into a repeatable process.

all workflows →

Related tool stacks

The tools that run it in production.

all tool stacks →

Related prompts

Reusable prompts for this job.

all prompts →

Comparisons & alternatives

Pick between the options.

all comparisons →