presentsUNAIVERSE
The UN AI timeline

Learn AI /Training and Model Adaptation /Zero-shot, one-shot and few-shot

Zero-shot, one-shot and few-shot

Also called: zero-shot, one-shot, few-shot, few shot learning.

Detail

In five seconds

What it is

These labels describe how many task examples a model gets in the prompt before it tries a new input: none, one, or a small handful.

In plain words

These words tell you how much help you give the model inside the prompt before asking it to handle a new case: no example, one example, or a few examples.

An everyday example

You ask a friend to label each item KEEP, GIVE AWAY or RECYCLE. Giving only the instruction is like zero-shot. Showing one labelled item before the next decision is like one-shot. Showing several labelled items, including awkward cases, is like few-shot. Your friend has not undergone new training. The examples are simply in view while each new item is considered.

Where the story stops working

A human assistant can ask clarifying questions and may apply broad real-world judgement. A model only uses patterns from its training and the immediate prompt. Also, in the analogy the person may truly learn a lasting rule after seeing examples, while prompt examples usually do not permanently update the model. Some research papers also use few-shot learning to mean actual additional training from a few examples, which this story does not show.

Remember thisZero-shot, one-shot and few-shot count the examples supplied in the prompt. They guide the model through context rather than changing its parameters.

This term is contested

The terminology is somewhat unsettled across fields: in large language model use, these labels often describe examples in the prompt, while in other machine learning literature, especially for few-shot learning, they may refer to learning methods that adapt from very small labelled datasets.

Understand it

Understand it

Why it matters

For non-specialists, these terms help you ask the right operational question: do we need a better prompt, a few strong examples, or actual model retraining? That affects cost, speed, privacy review, procurement and risk. Zero-shot is quick but may be less consistent. One-shot and few-shot can improve formatting and task guidance without changing the model, but they use more prompt space and still do not guarantee accuracy. Knowing the distinction also helps you challenge vague claims such as "we trained it on our data" when someone may only mean they added examples to a prompt.

How the same task changes from zero-shot to one-shot to few-shot

After reading the diagram, the reader should be able to explain that the difference is the number of examples placed in the prompt, not whether the model was retrained.

  1. 01

    Zero-shot

    The prompt contains an instruction and the new case, but no worked example.

    Draw a vertical stack: instruction box, new input box, arrow to output box. Add a small badge reading 0 examples.

  2. 02

    One-shot

    The prompt adds one example to show the pattern or format before the new case.

    Draw a vertical stack: instruction box, one example box, new input box, arrow to output box. Add a badge reading 1 example.

  3. 03

    Few-shot

    The prompt includes a small set of examples, often chosen to show the desired style or edge cases.

    Draw a vertical stack: instruction box, three small example boxes, new input box, arrow to output box. Add a badge reading few examples.

  4. 04

    Not fine-tuning

    Across all three panels, the model box stays the same. Only the prompt content changes.

    Place one shared model box beneath the panels with identical colour and label in all cases. Add a footer line: no parameter update.

Show three side-by-side panels with the same task and the same new input. Panel 1 includes only an instruction and the new input. Panel 2 adds one example before the new input. Panel 3 adds several examples before the new input. Arrows from each panel go to an output box. A footer note says: prompt changes; model parameters stay the same.

Hover or tap each panel to reveal the exact prompt structure for that panel; a toggle highlights that the model box does not change.

Describe this without the diagram

This comparison diagram has four parts. The first three panels show the same task with different prompt setups. In the zero-shot panel, an instruction and a new input go into the unchanged model, which produces an output. In the one-shot panel, the prompt adds one labelled example between the instruction and the new input. In the few-shot panel, the prompt adds several labelled examples before the new input. The fourth part is a note that the model itself remains unchanged in all three cases. The main message is that zero-shot, one-shot and few-shot differ by how many examples are included in the prompt, not by retraining the model.

With reduced motion: A static three-column comparison replaces any animation. Each column lists the prompt contents in order and points to an output, with one shared note underneath: the same model is used in every column and its parameters do not change.

Zero-shot, one-shot and few-shot describe a prompting setup, not a separate kind of model. The key question is: before asking for an answer, how many examples of the task do you place in the prompt? In a prompt, you give text, images or other input to the model. The model then produces an output such as a label, summary or draft reply.

In zero-shot use, you give only the instruction and the new input. In one-shot use, you add one example that shows the pattern you want. In few-shot use, you add a small number of examples, often two to ten, to guide the format, tone or decision rule. What goes in is the task instruction, sometimes examples, and then the new case. What happens is that the model uses patterns learned earlier during pretraining and later tuning, plus the examples in the prompt if you provide them. What comes out is a prediction or generated text for the new case.

These terms are closely related to in-context learning, which means the model adjusts its behaviour from the context inside the prompt without changing its stored parameters, meaning the internal numeric settings of the model. That is why zero-shot, one-shot and few-shot are different from fine-tuning. Fine-tuning changes the model itself by training on data. Few-shot prompting usually leaves the model unchanged and only changes the prompt.

People sometimes use these words loosely, and that can cause confusion. In older machine learning literature, few-shot learning can also mean training a system to learn new classes from very few labelled examples. In current large language model discussions, people often mean few-shot prompting inside one conversation. So it helps to ask: do they mean examples in the prompt, or additional training on a small dataset?

How “Labelling boxes for a clear-out” maps onto the real thing

In the storyIn the AI system
The rule for low, medium or high riskThe instruction in the prompt
One labelled note shown before the new noteOne-shot prompting
Several labelled notes covering edge casesFew-shot prompting
The assistant labels the next note without extra trainingThe model generates an output using context rather than changing parameters

A worked example

The associate expert tests three prompts for converting a cleared background paragraph into three concise talking points, each with the same structure and no added claims.

Starting from: A cleared background paragraph and the required output format: three talking points for informals, each no longer than 20 words.

  1. Zero-shot: provide the drafting instruction and the new paragraph, with no example. The model must infer how the requested talking points should look.
  2. One-shot: add one cleared source paragraph followed by its approved three-point output, then provide the new paragraph.
  3. Few-shot: add three cleared source-and-output pairs covering different sentence structures, then provide the new paragraph.
  4. Run all three prompts on the same input. In each case, the model conditions on the prompt and generates an answer using its existing parameters. It is not fine-tuned.

Result: One-shot may improve formatting, while few-shot may produce more consistent structure and treatment of recurring language. Neither guarantees accuracy. The associate expert still checks that the output reflects the cleared source, introduces no new position and is ready for the file.

In a United Nations workplace

An associate expert supporting executive services at a shared services centre must turn a cleared background paragraph into talking points for informals before close of business.

A zero-shot prompt gives only the drafting instruction. A one-shot prompt adds one cleared source-and-output pair, while a few-shot prompt adds several. The examples can establish format, tone and the treatment of recurring language without changing the model's parameters.

Before you try thisTalking points may contain negotiation-sensitive material. Do not paste draft positions, bracketed text or other sensitive content into a tool not approved for it. Use only cleared examples suitable for that system, and have the responsible desk officer verify every line before circulation.

Where you may hear it

  • During a vendor demo to an ICT governance board
  • While reviewing test results from an internal automation pilot
  • In a prompt-design session at Headquarters
  • During clearance of terms of reference for a model evaluation

Avoid confusion

Avoid confusion

Often confused with

Common misconceptions

  • Common misconception: Few-shot always means the model was trained on a small dataset.

    Correction: Not always. In many modern LLM discussions, few-shot means a few examples placed inside the prompt at use time. In some research areas, few-shot learning can mean extra training designed to work from very few labelled examples. Ask which meaning is intended.

  • Common misconception: One-shot or few-shot makes the model remember the examples permanently.

    Correction: Usually it does not. Prompt examples mainly influence the current response by providing context in that interaction. Permanent change usually requires some form of training or fine-tuning on stored data.

  • Common misconception: More examples in the prompt always improve quality.

    Correction: Not necessarily. Poor examples, contradictory examples, or too many examples can confuse the pattern, consume context space and even reduce performance. Example selection matters as much as example count.

  • Common misconception: Zero-shot means the model has never seen anything related before.

    Correction: No. Zero-shot usually means no task examples are provided in the prompt for this request. The model may still rely on broad patterns learned earlier during pretraining and later tuning.

Quick check

Which statement best distinguishes few-shot prompting from fine-tuning?

Go deeper

Go deeper

The simple version

These words tell you how much help you give the model inside the prompt before asking it to handle a new case: no example, one example, or a few examples.

The technical version

In current LLM practice, zero-shot, one-shot and few-shot usually refer to in-context prompting regimes. A prompt contains an instruction, optionally k labelled or pattern-setting examples, and then a query instance. The model conditions on the whole context and predicts the next tokens for the output, using its existing parameters rather than updating them. Zero-shot uses k=0, one-shot uses k=1, and few-shot uses a small k. This differs from fine-tuning, supervised fine-tuning or parameter-efficient methods such as LoRA, where optimisation updates parameters using training data. The terms can be ambiguous across subfields: in some machine learning literature, few-shot learning refers to methods built to generalise from very few labelled examples, sometimes with actual training episodes or meta-learning, not only prompt examples.

Reviewed external resources

Where this came from

Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.

The one thing to remember

Zero-shot, one-shot and few-shot count the examples supplied in the prompt. They guide the model through context rather than changing its parameters.