Skip to content

Zero-shot & few-shot learning

Also known as: zero-shot learning, few-shot learning

Updated 9 July 2026 Reviewed by Teemu Malinen

What is Zero-shot & few-shot learning?

Two ways of asking a model to do a task. Zero-shot gives no examples and relies on what the model already knows. Few-shot puts a handful of worked examples in the prompt to steer the format and quality of the answer. Few-shot usually does better on tricky or unusual tasks, at the cost of a longer prompt.

Why it matters

For most teams, a few examples in the prompt are the first and cheapest thing to try when output falls short, well before anyone weighs the cost of fine-tuning. What surprises people is how much the choice of examples matters. Two or three that closely mirror the real task, edge cases included, beat a dozen generic ones, and a badly chosen example steers the model wrong. There is a ceiling, though. Every example rides along on every call, so at high volume the token cost of few-shot mounts, and folding the same behaviour into the model through fine-tuning can work out cheaper. The rule of thumb is plain: start with examples, and move to training only when the volume justifies it.

In practice

A helpdesk that classifies incoming emails gets vague results from a plain instruction, then adds four labelled examples covering the tricky categories, and accuracy jumps. Months later, handling far higher volume, it finds the examples are inflating every prompt and the running cost with it. At that scale it fine-tunes a model on the same examples and drops them from the prompt. The examples proved the approach; training made it affordable.

Otto Sunnari, Sales and partnerships at Sofokus

Ready to start leveraging AI?

Call, email, or book a time straight from my calendar.

Otto Sunnari

Sales and partnerships