Aiodic

Back to the table

23 Intermediate Zs Zero-shot Prompting

Zero-shot

Asking for a task with no examples.

What it is

Zero-shot prompting means asking an AI to do a task without showing it a single example of the answer you want. You describe the job in words, and the model relies on everything it already learned to work out what you mean. "Summarise this email in three bullet points." "Is this customer review positive or negative?" "Translate this paragraph into Spanish." No sample summaries, no sample reviews with their labels, no sample translations. Just the instruction and the material.

The "shot" in the name means an example. If you include one worked example in your prompt, that's one-shot. Two to a handful is few-shot. None at all is zero-shot. Most of what people type into chatbots every day is zero-shot, whether they know the word or not.

The term is older than chatbots, and its history explains why it's a slightly odd thing to be able to do. For most of the history of machine learning, a system could only recognise what it had been shown. To build a program that spotted cats in photos, you gave it thousands of photos labelled "cat". To add dogs, you collected thousands of dog photos and trained again. A category with no training examples simply didn't exist for the system.

Researchers started asking whether that had to be true. In 2006, Li Fei-Fei, Rob Fergus and Pietro Perona published "One-shot learning of object categories", showing that a system could learn a new kind of object from a single picture, or a handful, by building on what it already knew about other objects. Then came the harder question: what about no pictures at all? In 2008 Hugo Larochelle, Dumitru Erhan and Yoshua Bengio called it "zero-data learning": generalising to a task for which you have only a description, not examples. In 2009 a paper by Mark Palatucci, Dean Pomerleau, Geoffrey Hinton and Tom Mitchell put the phrase "zero-shot learning" in its title. Their test case was striking: predicting which word a person was thinking about from a brain scan, even for words the system had never been trained on.

The trick in all of this early work was the same. Instead of examples, the system got a description, such as a list of properties, that connected the new category to things it had already learned. That's still exactly what you do when you write a zero-shot prompt. You can't show the model what you want, so you describe it well enough that it can connect your request to what it already knows.

Large language models turned this from a research curiosity into an everyday tool. When OpenAI released GPT-2 in February 2019, its paper tested the model on tasks such as reading comprehension, translation and summarising "in a zero-shot setting", meaning it was never trained on those specific tasks. The results were mixed and often crude. To get summaries, the researchers pasted in a news article and added the text "TL;DR:", internet slang for "too long, didn't read", which on the web is usually followed by a short summary. The model continued the pattern. By the standard scoring method, its summaries only just beat picking three random sentences from the article. But without the "TL;DR:" cue, it did far worse. Even then, the wording of the instruction mattered enormously.

Today's chat models are much better at this, for reasons covered in the examples below. They have been trained specifically to follow plain instructions, so for a wide range of everyday jobs, a clear request with no examples is all you need.

Why it matters

It's the fastest way to use AI. A zero-shot prompt takes seconds to write. You don't have to find or invent examples, and you don't spend part of the model's context window on them. For a quick email, a summary, a brainstorm or a first draft, zero-shot is usually the right starting point.

It's usually good enough for common tasks. Summarising, rewriting, translating, explaining, answering general questions and sorting text into obvious categories are all jobs the model has seen countless times during training. When the task is familiar and your standards are the usual ones, examples add little.

It tells you where the model's defaults are. A zero-shot answer shows you what the model does when left to its own judgement: its default length, tone, structure and assumptions. That's useful information. If the defaults are fine, you're done. If they're wrong in a consistent way (too long, too formal, too American), you know exactly what to add to the instruction.

It keeps you from copying your own mistakes. Examples are powerful, and that cuts both ways. A model shown three examples tends to copy them closely, including their length, their phrasing and their quirks. Sometimes you don't want that. When you want variety or a fresh approach, describing the goal without examples leaves the model room to find its own way.

It's the baseline for knowing whether anything else helps. Every other prompting technique, from few-shot examples to chain of thought to role prompting, is an addition to a plain request. The sensible order is to try the plain request first, see where it falls short, and add only what fixes the shortfall. If you never try zero-shot, you can't tell whether your examples are earning their place. Running both versions against a few real cases, as described under evals, settles the question.

It's where newer models are heading. Some of the newest AI models, called reasoning models, work through a problem internally before answering. Their makers have found that these often do better with a clear, direct instruction than with worked examples, as one of the examples below shows. Writing a strong zero-shot instruction is becoming more important, not less.

The limits are real, though. Zero-shot struggles when the task is unusual, when your idea of "good" is specific to you (your brand voice, your house format, your particular way of labelling things), or when a word in your request could mean two things. That's where examples, or a far more careful instruction, earn their keep.

Real-world examples

Recognising animals it had never seen (2009)

In 2009, Christoph Lampert, Hannes Nickisch and Stefan Harmeling at the Max Planck Institute for Biological Cybernetics in Tübingen, Germany, presented a paper at CVPR, one of the main computer vision conferences, called "Learning to detect unseen object classes by between-class attribute transfer". They asked whether a computer could recognise an animal in a photo without ever having seen a photo of that animal.

To test it, they assembled a dataset called Animals with Attributes: 30,475 photos of 50 kinds of animal. Each animal was described by 85 properties, such as "black", "stripes", "lives in water", "eats fish" or "has hooves", taken from earlier studies in which people rated how strongly each property fitted each animal. The system learned to spot the properties using photos of 40 animals. Ten animals, including the giant panda, the humpback whale, the leopard and the raccoon, were held back completely. For those, the system got only the list of properties, never a photo.

Given a photo of one of the unseen animals, it guessed which of the ten it was correctly 40.5 percent of the time, against the 10 percent you'd get by chance. A conventional system trained on photos of those same ten animals scored 65.9 percent, so describing wasn't as good as showing. But describing worked, and it worked with zero pictures. The paper's own illustration makes the logic clear: once a system has learned what "striped", "black and white" and "doesn't live in water" look like from other animals, a zebra can be described rather than shown.

That is the idea behind every zero-shot prompt you write. The better your description connects to things the model already knows, the better it can handle something it hasn't been shown.

CLIP: a picture classifier that learned from captions (January 2021)

On 5 January 2021, OpenAI introduced CLIP, a model that learns to match pictures with text. Instead of training on photos sorted into fixed categories, it was trained on 400 million pairs of images and their accompanying text collected from the internet. Because it understood both pictures and words, you could hand it any list of category names and ask which one fitted a photo best, with no extra training.

The headline result was about ImageNet, a famous benchmark with 1.28 million photos hand-labelled into 1,000 categories. Classifying zero-shot, the best CLIP model scored 76.2 percent, matching the original ResNet-50, a well-known system trained directly on those 1.28 million labelled photos. CLIP didn't use a single one of them.

The paper's details are a small lesson in writing zero-shot prompts. The researchers found that giving CLIP the bare category name wasn't the best approach. Wrapping it in a sentence, "A photo of a {label}.", raised ImageNet accuracy by 1.3 points, because the text CLIP learned from was usually a full sentence, not a single word. Adding context helped more on specialised sets: for pet breeds, "a type of pet"; for food and aircraft, "a type of food" and "a type of aircraft". They also hit the problem of words with two meanings. ImageNet contains both construction cranes and the birds, and in the pet breeds set "boxer" means a dog, but with no context the word could just as well mean an athlete.

CLIP also showed where zero-shot runs out. It did poorly on specialised or abstract tasks, such as counting objects, classifying satellite images or recognising traffic signs, and the paper noted that non-expert humans handle several of those easily. Familiar things, described clearly, worked brilliantly. Unusual things, described vaguely, did not.

FLAN: teaching a model to follow instructions (September 2021)

In September 2021, a Google team with Jason Wei as lead author published "Finetuned Language Models Are Zero-Shot Learners". The title was a deliberate reply to OpenAI's GPT-3 paper of the year before, "Language Models are Few-Shot Learners". GPT-3 was far better when shown examples than when simply asked. The Google team wanted to close that gap.

Their method, which they called instruction tuning, was to take a 137-billion-parameter language model and give it extra training on more than 60 existing language datasets, each rewritten as plain instructions: "Is this movie review positive or negative?", "Translate this sentence into French", and so on. The resulting model, FLAN, was then tested on kinds of task it had not been trained on.

It beat the 175-billion-parameter GPT-3 answering zero-shot on 20 of the 25 tasks tested, and on several it even beat GPT-3 when GPT-3 was given examples. In a blog post that October, Google's researchers added an important catch: instruction tuning only helped models above a certain size, and it made smaller models worse at unseen tasks.

This is the main reason zero-shot works so well for you today. The chat assistants that followed were trained in the same spirit, on huge numbers of instructions and responses (and then refined with human feedback, see RLHF). When you type a plain request and get a sensible answer, you are benefiting from the lesson FLAN helped establish: a model trained to follow instructions doesn't need to be shown what you want nearly as often.

A model that works better without examples (January 2025)

In January 2025, the Chinese AI company DeepSeek released DeepSeek-R1, a reasoning model (see DeepSeek), along with a paper describing how it was built. In a section on the model's limits, the team reported that it was sensitive to how it was prompted, and wrote: "Few-shot prompting consistently degrades its performance." Their advice was to describe the problem directly and specify the output format, with no examples.

That runs against the old rule that examples always help, and it isn't unique to one company. OpenAI's guidance for its own reasoning models has also suggested trying without examples first. At the time of writing, the general pattern is that for reasoning models, a clear zero-shot instruction is the recommended starting point. Advice changes as models change, so check the current guidance for whichever model you use.

An everyday scenario: the bakery's review sorter

Imagine Priya, who runs a small bakery and wants to sort 200 online reviews into complaints and compliments. She pastes them in with one line: "Classify each review as positive or negative." It mostly works, but reviews like "Lovely cakes, shame about the parking" land in either pile at random, and she can't tell what the model decided.

She doesn't reach for examples. She rewrites the instruction instead: three labels (positive, negative, mixed), a definition of each, a rule that anything mentioning a problem with an order counts as a complaint even if the tone is friendly, and a requested format of one line per review with the label and a five-word reason. Same model, still zero-shot, and now the results are consistent enough to act on. Where it still wavers, on a few sarcastic reviews, she adds two examples. That's the natural moment to move to few-shot.

Try it yourself

This exercise takes about fifteen minutes and works in any chatbot, such as ChatGPT, Claude, Gemini or Copilot, on a free plan at the time of writing. Features and limits change, so check your tool's current terms.

  1. Pick a real task you do often. Summarising meeting notes, sorting customer messages, writing product descriptions, tidying up a rough draft. Collect three real inputs for it, such as three emails or three sets of notes. Remove anything private first.
  2. Run the bare zero-shot version. Open a new chat and type your request in one line, the way you normally would. For example:
Summarise this email.

[paste email 1 here]

Do the same for your other two inputs, each in a fresh chat. Save the three answers.

  1. Note what you'd change. Read the answers and write down, in plain words, what's wrong. Too long? Missing the deadline? Wrong tone? Guessed at something it should have asked about? This list is your specification. Most people find it has three to five items.
  2. Write a refined zero-shot prompt. Still no examples. Turn your list into instructions using this template. Replace everything in square brackets:
Task: [what to do, starting with a verb]

Purpose: [who will use the result and what for]

Must include: [the things that matter most, for example
"any deadline, any money amount, and who needs to act"]

Rules: [anything to avoid or handle in a set way, for example
"if something is unclear, say so instead of guessing"]

Format: [length and layout, for example
"no more than 5 bullet points, then one line starting 'Action needed:'"]

Here is the input, between the lines:
---
[paste input here]
---
  1. Run it on all three inputs. Use a fresh chat each time. Compare with your saved answers from step 2. Count how many of your problems from step 3 are fixed on each input.
  2. Fix what's left with words first. If one problem remains, ask yourself whether the instruction could be clearer. Replace vague words ("short", "professional") with measurable ones ("under 80 words", "no exclamation marks"). Say what to do rather than only what not to do. Define any word that could mean two things.
  3. Decide whether you need examples. If the output is right on all three inputs, stop. Your zero-shot prompt is done, so save it somewhere you can reuse it. If the problem is a style or pattern that's easier to show than describe, such as your exact voice or a quirky format, that's the point to add one or two examples and move on to few-shot prompting.

Here is a filled-in version of step 4 you can adapt:

Task: Summarise the email below for me.

Purpose: I read these on my phone between meetings and need to
know in ten seconds whether I have to do anything.

Must include: any deadline, any money amount, and who is asking
me to act.

Rules: Do not add advice. If the email is unclear about what is
being asked, say "Unclear request" and quote the confusing sentence.

Format: At most 4 bullet points, each under 15 words. Then one
final line: "Action needed: yes" or "Action needed: no".

Here is the email, between the lines:
---
[paste email here]
---

Common mistakes and misunderstandings

Thinking zero-shot means low effort. Zero-shot means no examples, not no thought. A one-line request and a carefully specified instruction are both zero-shot, and they can produce very different results, as the bakery scenario and the exercise above show. Most of the quality in a zero-shot prompt comes from being specific about the purpose, the must-haves and the format.

Jumping to examples too early. Examples are the obvious fix when a first answer disappoints, but they cost you time to prepare and space in the prompt, and the model tends to copy them closely. Often the real problem is that the instruction left something out. Try fixing the words first.

Staying zero-shot too long. The opposite mistake. Some things are much easier to show than describe: a particular writing voice, an unusual layout, a labelling scheme with fuzzy edges. If you've rewritten the instruction three times and the model still misses the pattern, two good examples will usually do what another paragraph of description can't.

Leaving words ambiguous. CLIP's "boxer" problem happens in text too. "Summarise the key points" means different things to a lawyer and to a marketer. "Classify as urgent" means nothing unless you say what counts as urgent. Zero-shot has no examples to clear up what you meant, so the definition has to be in the words.

Assuming a zero-shot answer is a fact. When the model answers a question from its general knowledge, with nothing to check against, it can state wrong things confidently (see hallucination). Zero-shot is great for tasks where you provide the material, such as summarising your own document. For facts, give the model a source, or check the answer yourself.

Judging from one try. Chatbots don't give the same answer twice. One good zero-shot result doesn't prove the prompt works, and one bad one doesn't prove it fails. Test on at least three real inputs before you decide.

Using magic phrases instead of clarity. One famous phrase, "Let's think step by step", did improve zero-shot answers to reasoning problems in 2022 research (see chain of thought). That doesn't mean there's a secret sentence for every task. A clear description of what you want beats any borrowed formula.

Related elements