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 →'. This dictionary node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
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 →'.
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 for AI and automation?
Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern. It connects to the workflows, prompts and tool stacks linked on this page, so you can move from definition to execution without leaving Onexial.