Definition

Few-shot prompting supplies a small number of worked examples in the model’s input before asking it to handle a new case. Each example demonstrates a relevant input and the expected output or response pattern.

The examples can clarify labels, formatting, tone, or task-specific rules. They influence the current inference request through the context. They do not update the model’s parameters.

Simple example

A support application classifies incidents as network, storage, or identity. Its prompt includes examples such as:

Incident: The VPN disconnects every five minutes.
Category: network

Incident: My password reset link has expired.
Category: identity

The prompt then provides a new incident: I cannot sign in after changing my password. The examples show both the expected label format and how the application uses its categories.

Why it matters

Examples can remove ambiguity that instructions alone leave behind. This is useful when an application uses unfamiliar labels, expects a specific output shape, or needs to show how a rule applies to borderline cases.

The tradeoff is that every example consumes context-window capacity and usually adds input cost. A weak or unrepresentative set can steer results in the wrong direction. Compare the few-shot prompt with a zero-shot baseline, and test both on representative inputs rather than assuming that more examples will improve the result.

One important nuance

Few-shot prompting is not fine-tuning. The application supplies the examples at inference time, often with every request or by selecting them dynamically. Fine-tuning uses a training process to change some or all model parameters, so the adapted behavior does not depend on repeating the same examples in the prompt.

There is no universal number that turns a prompt into “few-shot”. The term means that the prompt contains a small demonstration set, not that it contains an agreed fixed count.