What is zero shot prompting in AI?
Zero shot prompting in AI is when you give a language model a task described only in words, without showing it a single solved example.
The word "shot" simply means "example". So zero-shot means zero examples, one-shot means one example and few-shot means a handful. When you type "Summarise this paragraph in two lines" into ChatGPT, Gemini or Claude, you are already doing zero-shot prompting.
It works because modern large language models have seen huge amounts of text during training, and most were later tuned to follow instructions. They have already met summaries, translations, emails and quiz questions thousands of times, so a clear instruction is often enough.
Zero-shot is also the first technique you learn in prompt engineering, because every other technique builds on top of it.
Zero shot prompting examples you can try
A zero shot prompt example is any prompt that states the task and the input but includes no sample answers. Here are three you can paste into any chatbot.
1. Sentiment classification
Classify the sentiment of this review as Positive, Negative or Neutral. Review: "The delivery was late but the paneer tikka was amazing." Sentiment:
2. Translation
Translate this sentence into simple Hindi: "Please submit your assignment before Friday."
3. Extraction
From the message below, list the date, time and venue as three bullet points. Message: "Farewell party is on 14 March at 6 pm in the college auditorium."
Notice what is missing: none of these prompts show the model a finished answer. The model has to infer the format and the logic from the instruction alone. A good zero-shot prompt is specific about the task, the output format and any limits, such as "answer in one word" or "use only the text given".
Zero shot vs few shot prompting: what is the difference?
The difference is simple: zero-shot prompting gives only an instruction, while few-shot prompting adds a few worked examples before the real question.
| Technique | Examples in the prompt | Best for |
|---|---|---|
| Zero-shot | None | Common tasks with an obvious format |
| One-shot | One | Showing a specific output style once |
| Few-shot | Usually 2 to 5 | Custom labels, strict formats, tricky edge cases |
Zero-shot prompts are shorter, cheaper in tokens and faster to write. Few-shot prompts take more effort but give the model a pattern to copy, which usually makes the output more consistent.
A practical rule: start zero-shot. If the answers come back in the wrong format or miss the point, add two or three examples and you have turned it into a few-shot prompt.
When does zero shot prompting work, and when does it fail?
Zero shot prompting works well for familiar, clearly defined tasks and struggles with unusual formats, private rules or multi-step reasoning.
It usually works for:
- Summaries, translations, rewriting and grammar fixes
- Simple classification like positive or negative
- General knowledge explanations and quick drafts
It often fails for:
- Custom labels. If your company tags tickets as "P1-Billing" or "P3-Login", the model cannot guess that scheme without examples.
- Strict output formats. It may add extra sentences when you needed clean JSON.
- Multi-step maths and logic. The model may jump to an answer. Asking it to reason first, using chain-of-thought prompting, often helps.
- Facts it never saw. No prompt can supply knowledge the model lacks, and it may hallucinate instead of saying "I do not know".
My teaching tip: when a zero-shot prompt gives a bad answer, do not immediately blame the model. First rewrite the instruction to be more specific. Often, that alone fixes it.
Zero shot learning vs zero shot prompting
Zero-shot learning is the broader machine learning idea of a model handling categories or tasks it never saw labelled examples of, while zero-shot prompting is the practical act of asking an LLM to do a task without examples in the prompt.
Zero-shot learning existed before chatbots. A classic example is an image model that recognises a zebra after learning about horses and the description "a horse with black and white stripes", without ever seeing a labelled zebra photo.
With LLMs, the two ideas meet. When you write a zero-shot prompt, you are relying on the model's zero-shot ability: its skill at generalising from training to a new instruction. Research such as Google's FLAN work showed that tuning models on many tasks written as instructions improves this zero-shot performance on tasks they were not tuned on.
So, in short: zero-shot learning describes what the model can do; zero-shot prompting describes how you ask.