How it works

Zero-shot is the ability of a model to perform a task for which it received no examples, neither in training nor in the prompt. The model uses only the instruction, what to do, and its prior knowledge to produce the response.

In modern language models, zero-shot works because the model was trained on a huge variety of texts and learned general patterns. It is enough to describe the task in natural language and it tries to execute it.

Practical example

You ask the model: "Classify the sentiment of this text as positive, negative or neutral: 'O produto chegou quebrado'." With no previous examples, the model answers "negative". That is zero-shot.

If you add one or two examples before the question, it becomes one-shot or few-shot, which usually improves accuracy on specific tasks.

What it's for

Zero-shot is useful when you have no labeled examples or want to prototype quickly. It is the basis of assistants and chatbots, which need to handle varied requests without specific training. Quality depends on the clarity of the instruction and how common the task is in the model's knowledge.