Few-Shot Prompting
Providing 2-5 examples of desired input-output pairs in your prompt before asking the AI to perform the task. Significantly improves output quality for specialized tasks.
Why it matters
Few-shot prompting is the easy fix when zero-shot gives inconsistent or oddly formatted answers. By showing the AI two or three examples of exactly what you want, you teach it the pattern without any coding or training. It matters because it's the most reliable way to lock in a consistent style or output format, which is exactly what trips people up in real work.
In practice
Want product names turned into short taglines? Show the pattern: "Product: bamboo toothbrush -> Tagline: Brush greener. Product: steel water bottle -> Tagline: Ditch the plastic." Then add "Product: cotton tote ->" and let it finish. Those two examples teach length, tone, and format in one shot, so you get consistent taglines instead of the AI guessing what style you had in mind.
Related terms
A/B Testing (for Prompts)
Running two or more prompt variations against the same AI model to compare output quality. Data-driven prompt optimization that consistently outperforms intuition-based prompting.
Chain-of-Thought (CoT)
A prompting technique that instructs the AI to reason step-by-step before giving a final answer. Dramatically improves accuracy on complex reasoning, math, and logic tasks.
Prompt Engineering
The skill of crafting effective AI prompts to achieve desired outputs. Techniques include role-setting, few-shot examples, chain-of-thought reasoning, and constraint specification.
System Prompt
A special instruction set given to an AI model before the user's message, defining the model's persona, behavior rules, output format, and constraints. The foundation of custom AI assistants and chatbots.
Zero-Shot Prompting
Asking an AI to perform a task without providing any examples. Relies entirely on the model's pre-trained knowledge. Works well for common tasks.