MMOOZZGG.com

Glossary

What is zero-shot prompting?

In short

Zero-shot prompting is a way to work with a neural network in which you describe the task in words and give no ready example of a solution.

Prompts · zero-shot prompting

MMOOZZGG.com editorsChecked: 1 min read

For a child

You get a new board game, and someone only reads the rules aloud. Nobody shows you how to move; you start playing on your own. If the rules are clear, you get it right the first time. A neural network can do the same: someone explains the task in words, without a sample, and it tries to do it. Sometimes it makes mistakes, and then people show it how.

In plain words

You can set a task for a neural network in two ways: show it a couple of samples or just describe what you need. The second way is called zero-shot, meaning “without examples”. For example, you write “Decide whether this is a complaint or a thank-you” and attach a review. The model copes because during training on a huge amount of text it has already seen similar tasks. This is fast and easy, but on rare or tricky formats the answer may drift, and then you add samples.

For business

For a company, this mode means a task can start within an hour: you do not need to collect labeled data or train your own model. Teams start with it for sorting requests, pulling company details from emails and drafting replies. It costs less than prompts with samples, because the instruction is shorter and uses fewer tokens. The risk is inconsistency: on unusual inputs the model mixes up categories or changes the answer format. So first compare this option with a version with samples on one set of real data, and choose by the share of correct answers and the price. Such comparisons are part of the task review, before rollout.

For a specialist

Zero-shot prompting means giving a model a task with only a natural language instruction, without in-context demonstrations. Brown et al. (2020), in the GPT-3 paper, separated three evaluation modes, all without weight updates: a task description only, one demonstration (one-shot) and several (few-shot). The authors called the mode without demonstrations the most convenient and the most difficult: sometimes even a person cannot understand the task format without a sample. Kojima et al. (2022) showed that one phrase prompting step-by-step reasoning (zero-shot chain-of-thought) raised the accuracy of text-davinci-002 on MultiArith from 17.7% to 78.7% and on GSM8K from 10.4% to 40.7%. Instruction tuning strengthens the ability to work without examples. The name itself comes from machine learning, where zero-shot learning means recognizing classes that were not in the training set.

Example

The sales team sends the model a customer email with the request “Extract the tax ID, the amount and the delivery date”. There are no samples, but the model returns the three fields, and the manager only checks the numbers.

Related terms

Questions and answers

How is zero-shot different from few-shot? In the first case the model gets only a description of the task. In the second, a few “input and correct answer” pairs are added to the description, and the answers become more consistent in format.
When is a prompt without examples enough? When the task is standard and easy to describe in words: translation, a short summary, simple classification. If the answer format is complex or the categories are unusual, you need samples.

Sources

Not sure whether your company needs this?

AI solutions map
Contact us