Zero-Shot Prompting
Zero-shot prompting is a technique where you give a language model a task description or instruction without providing any examples of the desired output. The model relies solely on its pre-trained knowledge to generate a response. Operators encounter this when they ask a model to perform a new task, like summarizing a document or translating a sentence, without showing it how. The model's ability to handle zero-shot tasks depends on its training data and size—larger models (e.g., 70B parameters) tend to perform better than smaller ones (e.g., 7B) at zero-shot tasks.
Practical example
An operator runs ollama run llama3.1:70b and types 'Translate this to French: Hello, how are you?' The model outputs 'Bonjour, comment allez-vous?' without any prior examples of translation. This is zero-shot prompting. On a smaller model like phi3:3.8b, the same prompt might produce a less accurate translation or even refuse, showing the capability gap.
Workflow example
In LM Studio, an operator loads a model and enters a prompt like 'Classify this review as positive or negative: The product was terrible.' Without any labeled examples, the model outputs 'Negative.' This is zero-shot classification. Operators often test zero-shot performance when evaluating a new model for a specific task before investing in few-shot or fine-tuning workflows.
Reviewed by Fredoline Eruo. See our editorial policy.