Zero-Shot Learning: When a Model Handles the Unseen

LLM foundationsModels and inferencePublished By Simon Budziak

Zero-shot learning is when a model handles categories or tasks it never saw during training. It leans on descriptions or related knowledge instead of examples. Prompting an LLM to do a new task with no examples is its everyday form.

How can a model recognize what it has never seen?

Through shared representation. Classic zero-shot systems align inputs and class descriptions in one embedding space: the model learns visual or textual features against semantic descriptions, so a new class, described by attributes, lands at a predictable place in that space, and inputs near it get the label. The textbook example: a model that knows horses, told that a zebra is a striped horse, flags zebras on first sight. The model is not learning the new class; it is locating it inside what it already learned, which is also why quality of the description bounds quality of the result.

Why did LLMs make zero-shot the default?

Because pretraining at scale built a representation broad enough for most tasks to land inside it. A capable LLM performs classification, extraction or rewriting from a bare instruction, no task examples, which is zero-shot machine learning delivered through a prompt. This is the extreme end of transfer learning: all knowledge transferred, nothing task-specific trained. The practical consequence for teams is the pilot economics: a zero-shot baseline costs an afternoon, so every task should start there and earn its way to anything more expensive.

When is zero-shot not enough?

When consistency, precision or distribution-shift bites. Zero-shot output varies with wording, struggles on classes that look alike, and biases toward what pretraining saw often; generalized settings, where seen and unseen classes mix, show the bias plainly. The escalation ladder is standard: add examples to the prompt, then fine-tune when volume and stability justify it. Judge the step by measurement, not instinct: a small labeled evaluation set tells you whether zero-shot’s convenience is costing accuracy you actually need. Move up the ladder only when the eval says so, because each rung adds cost and upkeep that the baseline avoids.

This entry was drafted with AI assistance.

Frequently asked questions

What is zero-shot learning in simple terms?

A model doing something it was never trained on, from a description alone. Told that a zebra is a striped horse, a model that knows horses can flag zebras without having seen one.

What is the difference between zero-shot and few-shot?

Zero-shot gives the model no examples of the task, only instructions or descriptions. Few-shot gives a handful of examples in the prompt. Few-shot usually improves consistency at the cost of longer prompts.

Why does zero-shot learning work at all?

Because the model learned a rich shared representation during pretraining. New categories and tasks land inside that representation, described in words or attributes, close enough to known ones for the model to generalize.

Summarize this page with

Train your team to build this