When prompting a large language model, what is the essential difference between zero-shot and few-shot prompting?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Pay close attention here—this one shows up a lot. Zero-shot: you just ask. "Classify this review as positive or negative." No samples. Few-shot: you show a couple of mini examples in the prompt first, then ask for the new case. Think of it like briefing a junior analyst with zero walkthroughs versus three sample tickets. Exam trap: this is not "supervised vs unsupervised training," and it's not locked to generation-only versus classification-only. Same model, different prompt recipe. Remember—shots equal examples in the prompt. Zero means none; few means a handful. You've got this.
Full explanation below image
Full Explanation
Prompting strategies for large language models differ in how much task demonstration is supplied at inference time. In zero-shot prompting, the user provides a natural-language instruction or query without including solved examples of the desired behavior. The model must rely on patterns internalized during pretraining (and any system instructions) to interpret the request and produce an answer. In few-shot prompting, the prompt also contains a small number of illustrative input–output pairs that establish format, label set, tone, or reasoning style before the actual instance is presented. That is the essential difference: absence versus presence of in-context examples.
It is a misconception to map zero-shot to supervised learning and few-shot to unsupervised learning. Supervised and unsupervised labels describe how models are trained from datasets with or without targets. Zero-shot and few-shot prompting are inference-time interface patterns layered on an already trained model; few-shot examples in the prompt are not the same as gradient-based fine-tuning on a labeled set (though related ideas appear in in-context learning research).
It is also incorrect to restrict few-shot to text generation and zero-shot to classification. Both can support classification, extraction, summarization, code synthesis, and other tasks. What changes is how strongly the prompt constrains outputs via demonstrations. Claiming there is no difference ignores that demonstration count and quality often materially affect accuracy and formatting reliability.
Best practices include writing clear instructions for zero-shot cases, choosing diverse and representative few-shot examples, matching example format to the desired output schema, and watching context-window limits as shots increase. Some teams use one-shot as a middle ground. For exams, lock the definition to examples-in-prompt: zero means none; few means several. That clean contrast is what the item is testing, not training paradigms or task-type exclusivity.