Kipt

Your prompts and skills, one keystroke away.

Explore

Zero-shot prompting: what it is and when to add examples

Zero shot prompting explained: what a zero-shot prompt is, when it works well, when to switch to few-shot examples, and how reasoning models change it.

By the Kipt team · Updated 27 October 2026

Zero-shot prompting is giving a language model a task with instructions but no examples of the desired output. The model has to work out what you want from your wording alone. It is the default way most people prompt, and on current models it often works well for common tasks; you switch to few-shot prompting when the output's format, tone or judgment needs to be shown rather than described.

Google's prompting strategies guide gives the standard definitions: "Prompts that contain a few examples are called few-shot prompts, while prompts that provide no examples are called zero-shot prompts."

This page explains what a zero-shot prompt looks like, when it is enough, when to add examples, and how the advice differs between Anthropic, OpenAI and Google. Vendor guidance was checked on 27 October 2026.

What does a zero-shot prompt look like?

A zero-shot prompt states the task, the constraints and the output format, then gives the input:

Classify the support ticket below as one of: billing, bug, feature_request.
Reply with only the label.

<ticket>
I was charged twice for my October invoice.
</ticket>

There are no labeled examples. Compare that with a few-shot version, which would add two or three tickets with their correct labels before the real one. See few-shot prompting for that form.

A zero-shot prompt is not the same as a vague prompt. The quality of a zero-shot prompt comes entirely from the instructions, so they need to be specific. Anthropic's prompting best practices say "Being specific about the output you want can help enhance results," and that "If you want Claude to do more than the task strictly requires, explicitly request it rather than relying on the model to infer this from vague prompts."

When does zero-shot prompting work well?

When the task is common, the labels or terms are clear, and the output format is easy to describe. Typical cases:

  • Well-known tasks: summarizing, translating, explaining code, drafting an email, extracting named fields.
  • Clear categories: classification where the label names are self-explanatory.
  • Format enforced elsewhere: when a JSON Schema or tool definition already fixes the shape of the output.
  • Reasoning models: models that plan internally often need less steering.

OpenAI's reasoning best practices are explicit about the last point: "Try zero shot first, then few shot if needed: Reasoning models often don't need few-shot examples to produce good results, so try to write prompts without examples first."

OpenAI's general prompt engineering guide also includes a zero-shot case in its front-end engineering section: "GPT-5 can generate front-end web apps from a single prompt, no examples needed."

When should you add examples instead?

When describing the target is harder than showing it, or when your tests show the model drifting. Signs that a zero-shot prompt has hit its limit:

What you see Why examples help
Format varies between runs Examples show the exact shape, spacing and tags
Tone or style is off Style is easier to show than to describe
Edge cases get the wrong label Examples mark where category boundaries sit
A house convention is ignored The model cannot know conventions it never saw

Google puts its recommendation strongly: "We recommend to always include few-shot examples in your prompts. Prompts without few-shot examples are likely to be less effective." It adds that "you can remove instructions from your prompt if your examples are clear enough in showing the task at hand," and that few-shot prompts are often used "to regulate the formatting, phrasing, scoping, or general patterning of model responses."

Anthropic says examples "are one of the most reliable ways to steer Claude's output format, tone, and structure," and recommends three to five well-chosen ones. OpenAI's caution for reasoning models runs the other way: if you add examples, "ensure that the examples align very closely with your prompt instructions, as discrepancies between the two may produce poor results."

Why do the vendors disagree on zero-shot vs few-shot?

They are describing different defaults for different models, and the guidance is less opposed than it looks.

  • Google writes its general guide for Gemini models across many task types and treats examples as the default.
  • OpenAI separates reasoning models from GPT models. Its guide says GPT models "benefit from very precise instructions," while reasoning models "will provide better results on tasks with only high-level guidance." Its zero-shot-first advice is aimed at reasoning models.
  • Anthropic recommends examples for steering format, tone and structure, and adds that "Multishot examples work with thinking."

The practical reading: start with a clear zero-shot prompt, because it is shorter and cheaper and avoids the risk Google flags that too many examples make the model "overfit the response to the examples." Add examples when your tests show a gap that instructions alone do not close.

How do you get a fixed format without examples?

Use a schema instead of format examples. OpenAI describes Structured Outputs as "a feature that ensures the model will always generate responses that adhere to your supplied JSON Schema." Anthropic's structured outputs "constrain Claude's responses to follow a specific schema, ensuring valid, parseable output for downstream processing."

With the shape enforced by the API, a zero-shot prompt only has to explain the meaning of each field. You can then reserve examples for the hard part, such as how to judge an ambiguous case. See LLM structured output for setup details.

What is zero-shot chain of thought?

It is a zero-shot prompt that also asks the model to reason before answering, with no worked examples. On older or non-reasoning models, adding a line such as "work through it step by step before giving the answer" can help on multi-step problems.

On current reasoning models this is mostly built in. OpenAI's reasoning guide says: "Since these models perform reasoning internally, prompting them to "think step by step" or "explain your reasoning" is unnecessary." The chain of thought prompting page covers when a manual reasoning prompt still makes sense.

How do you write a strong zero-shot prompt?

Because there are no examples to lean on, every instruction has to carry weight. A checklist:

  1. Name the task in one sentence, including who the output is for.
  2. List the allowed outputs when there is a fixed set, such as labels.
  3. Say what to do with bad or missing input, for example "If the ticket fits none of these, reply unknown."
  4. State length and format limits in concrete terms.
  5. Give the reason behind unusual constraints, since Anthropic notes Claude can generalize from an explanation.
  6. Separate instructions from input with tags or headings.

Then test it on real inputs. If it passes, keep it zero-shot. If it fails on a pattern, add one or two examples that target that pattern and test again.

Prompts that pass that test are worth keeping. Kipt saves prompts as Markdown in a private GitHub repo you own, with {{name:default}} blanks for the parts that change, so a tested zero-shot prompt and its few-shot variant can sit side by side.

Few-shot prompting covers how many examples to use and how to pick them. The prompt engineering workflow page shows the full process from success criteria to versioned prompts, and what is a system prompt explains where standing instructions belong.

Questions

What is zero-shot prompting?

Zero-shot prompting means giving a language model instructions for a task without any examples of correct output. The model relies on what it learned in training plus your instructions. Google's Gemini prompting guide defines zero-shot prompts as prompts that provide no examples, in contrast to few-shot prompts, which contain a few.

What is an example of a zero-shot prompt?

"Classify this support ticket as billing, bug or feature request. Reply with one word." followed by the ticket text is a zero-shot prompt. It names the task, the allowed labels and the output format, but it shows no labeled examples. If the model mislabels edge cases, adding a few examples turns it into a few-shot prompt.

Is zero-shot or few-shot prompting better?

It depends on the model and the task. Google recommends always including few-shot examples for Gemini prompts, while OpenAI tells you to try zero-shot first with its reasoning models and add examples only if needed. Test both on the same inputs and keep the simpler prompt if results are equal.

What is zero-shot chain of thought?

Zero-shot chain of thought is a zero-shot prompt that also asks the model to reason step by step before answering, without worked examples. On current reasoning models this reasoning happens internally, and OpenAI says asking its reasoning models to think step by step is unnecessary. It still helps on models where thinking is off.

How do I get a fixed output format without examples?

Use structured outputs. OpenAI's Structured Outputs feature makes responses adhere to a JSON Schema you supply, and Anthropic's structured outputs constrain Claude's responses to a specific schema. A schema enforces the shape, so you can stay zero-shot and spend examples only on tone or judgment.

More in Learn

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.