# Zero-Shot Prompting

Canonical: https://aimastermindlab.com/glossary/zero-shot

---
Zero-shot prompting asks an LLM to perform a task without providing any examples, relying entirely on the model's pre-trained knowledge and the clarity of the instruction. It works well for common tasks but often requires examples for specialised or nuanced outputs.

## What is Zero-Shot Prompting?

Zero-shot prompting means giving an LLM a task description with no training examples — just an instruction and the input. The model must generalise from its pre-training to handle the task.

```
Classify the sentiment of the following review as Positive, Negative, or Neutral.
Review: "The battery life is outstanding but the camera is mediocre."
Sentiment:
```

## Why Zero-Shot Works

Large LLMs have encountered millions of classification, summarisation, translation, and reasoning tasks during pre-training. Zero-shot performance exploits this latent knowledge — the model can often perform tasks it was never explicitly trained for, simply because similar tasks appeared in its training data.

## Zero-Shot CoT

One of the most impactful zero-shot techniques: appending "Let's think step by step" to a prompt dramatically improves reasoning accuracy on complex problems, without any examples. This phrase triggers the model's chain-of-thought reasoning mode.

## When Zero-Shot Fails

- Highly specialised domain terminology the model hasn't seen.
- Non-standard output formats.
- Tasks requiring very consistent formatting.
- Tasks where the exact boundary conditions matter.

In these cases, move to few-shot prompting or fine-tuning.

## Example

'Translate the following to French: The meeting is at 3pm.' — This is zero-shot; no translation example is provided. GPT-4 will correctly handle this since translation is common in training data.
---

Source: https://aimastermindlab.com/glossary/zero-shot — AI Mastermind Lab (https://aimastermindlab.com)
