Learning Paradigms

Zero-shot Learning

In shortGetting a model to perform a task or apply labels it was never trained on, with no examples, using only knowledge from pre-training.

Updated 24 Oct 2026· 2 min read

Zero-shot learning means asking a model to do a task, or to use labels, it has never been trained on, without giving it any examples. You describe the categories (for instance “informational”, “commercial”, “transactional”) and the model assigns them using what it learned during pre-training. It is the fastest way to label data when you have no training data, and it is how most people use a chatbot.

How it works

There are two common forms in MLforSEO material. The first is a zero-shot classifier such as BART-large-MNLI on Hugging Face. It turns classification into a reasoning test: each text is treated as a premise, each candidate label becomes a hypothesis like “This text is about politics”, and the probability that the text entails the hypothesis becomes the label score. The second is zero-shot prompting of a large language model: you give an instruction with no examples. Adding one or a few examples turns it into one-shot or few-shot prompting. Image models like CLIP can also classify zero-shot: you write categories as captions and the model picks the closest caption for each image.

How it’s used in SEO and marketing

  • Search intent classification of keyword lists against your own intent categories.
  • Quick sentiment or topic labelling of reviews when there is no labelled dataset.
  • Auditing an image library by type (product on white, lifestyle, stock photo, screenshot) with CLIP.
  • Zero-shot topic modelling in BERTopic, where you supply topics you expect and the model matches documents to them.

Example

MLforSEO’s transformer-based intent notebook uses BART zero-shot, blended with query rules and SERP signals. On a GPU it labels roughly 1,700 keywords in under three minutes, against your categories, with no training data. It is less accurate out of the box than the slower entity-based semantic parsing approach, because it relies entirely on a pre-trained model; fine-tuning improves it. In the NLP API comparison, the chatbots were given a deliberately zero-shot prompt (no examples, no allowed entity types), because that is how most people use them.

Limitations and things to watch

  • Accuracy depends heavily on how you word the labels; vague or overlapping categories produce noisy results.
  • Zero-shot LLM labelling can return different answers to the same text on different runs, and costs more per item at scale than a purpose-built model. A low temperature and few-shot examples help but do not close the gap with a task-specific API.
  • Always check a hand-labelled sample before trusting the output. If the task is a well-defined classification you will repeat at scale, move to supervised learning or a dedicated API.

Learn it on MLforSEO

Where Zero-shot Learning shows up on MLforSEO

Sources and further reading

Other terms from Learning Paradigms