This page explains the three main ways to teach a language model a task inside a single prompt — with no examples, with one example, or with several — and gives you an interactive picker to choose the right one for your situation.
What the three approaches mean
Zero-shot prompting gives the model an instruction and nothing else: “Classify this review as positive or negative.” It relies entirely on what the model already learned in training. One-shot adds a single worked example before your real input, showing the model exactly what a correct answer looks like. Few-shot includes several examples — commonly two to eight — which is enough to pin down the output format and demonstrate how to handle edge cases. All three are forms of in-context learning: the model adapts from the prompt without any change to its weights.
When to use each
Reach for zero-shot when the task is common and the model clearly understands it already — summarising, translating, or simple classification with obvious labels. Move to one-shot when the model gets the idea but not the exact format you want; a single example often fixes formatting without much added cost. Use few-shot when the task is unusual, the output format is strict, or there are tricky edge cases the model keeps mishandling. The examples act as a specification the model imitates. The interactive picker below maps your task type and format strictness to a suggested starting point.
Tips that make examples work
The quality of few-shot examples matters more than the quantity. Keep them diverse so the model does not latch onto one narrow pattern, keep them correct because a single wrong example teaches the wrong behaviour, and keep the format identical to what you want back. Order can matter too — models sometimes weight the most recent example most heavily. If a few-shot prompt grows long and expensive and the task is stable, that is the signal it may be worth fine-tuning instead.