# (Day 4/10) Few-Shot, Zero-Shot, and One-Shot Prompting: When & Why

## Understanding Shot-Based Prompting

Shot-based prompting refers to techniques that vary based on the number of examples you provide to the AI before asking it to perform a task.

### Zero-Shot Prompting Asking an AI model to perform a task without providing any examples first, relying entirely on the model's pre-existing knowledge.

### One-Shot Prompting Giving the AI model a single example of the task before asking it to perform a similar task, providing minimal but crucial guidance.

### Few-Shot Prompting Providing the AI with multiple examples (typically 2-5) of a task before asking it to perform a similar task.

## When to Use Each Approach

### Zero-Shot: Best for - Common and straightforward tasks - Quick responses needed - Diverse, creative outputs desired - Testing baseline capabilities

### One-Shot: Best for - Slightly more guidance than zero-shot needed - Establishing a specific format or tone - Resource efficiency matters - Moderately familiar tasks

### Few-Shot: Best for - Precise formatting or structure required - Consistent, predictable outputs needed - Complex or specialized tasks - Working with specialized terminology

## Comparative Analysis: Impact on Performance

- **Accuracy & Reliability:** Few-shot typically provides highest accuracy - **Resource Efficiency:** Zero-shot is most token-efficient - **Flexibility & Adaptability:** Zero-shot most flexible for diverse outputs


Author: Dr. Hernani Costa — Founder of First AI Movers and Core Ventures. AI Architect, Strategic Advisor, and Fractional CTO helping Top Worldwide Innovation Companies navigate AI Innovations. PhD in Computational Linguistics, 25+ years in technology.

Originally published at First AI Movers under CC BY 4.0.