Prompt Engineering Fundamentals
Beginner 8 min Module 3 of 6
Module 3 of 6

Zero-Shot, Few-Shot, and Chain-of-Thought

A model that has never seen an example of your task can still do it well, if you ask correctly. But give it just two examples, and accuracy jumps measurably. Give it a thinking path, and it can solve problems that once required specialized systems. This module covers three techniques that change what is possible.

By the end of this module you will be able to

Why Technique Matters

Most people use one approach for every prompt: ask and hope. This works for simple, familiar tasks. It breaks down the moment you need the model to handle something specialized, multi-step, or structurally unusual.

Three well-studied techniques cover the vast majority of real-world prompting needs: zero-shot, few-shot, and chain-of-thought. Each is suited to a different class of problem. Knowing which to reach for is one of the highest-leverage skills in applied AI work.

Zero-Shot Prompting

Zero-shot prompting means asking the model to perform a task with no examples provided. You describe what you want and let the model draw entirely on what it learned during training.

This works reliably for tasks the model has encountered many times in its training data: summarization, translation, sentiment classification, reformatting text, answering common factual questions. For these tasks, the model already has strong patterns to draw on.

Summarize the following paragraph in one sentence.

[paste paragraph here]

Brown et al. (arXiv:2005.14165) demonstrated that large language models can perform tasks with zero examples when the task is described clearly, drawing on patterns absorbed during pre-training. This was a foundational finding: models are not blank slates that require training on every new task. They generalize.

When zero-shot works best Common tasks with clear descriptions: summarize, translate, classify sentiment, reformat text, answer a general question. If the task is something a skilled human could do with only your instructions and no worked examples, zero-shot is likely enough.

Few-Shot Prompting

Few-shot prompting means including a small number of worked examples, typically two to five, directly in the prompt. The model uses these to understand the exact format, terminology, and pattern you expect.

Brown et al. (arXiv:2005.14165) showed that providing even a handful of examples dramatically improves performance on tasks that are specialized, unusual, or require a specific output structure that the model would not guess correctly on its own.

Classify each customer message into one of these categories: Billing, Technical, Returns, General.

Message: "I was charged twice for my subscription."
Category: Billing

Message: "The app crashes every time I open it."
Category: Technical

Message: "I want to send back the item I ordered."
Category: Returns

Message: [new customer message here]
Category:

The examples do two things at once. They define the valid output values (Billing, Technical, Returns, General), and they show the model the format of the response. Without them, the model might return a full sentence instead of a single-word category, or invent categories you did not intend.

When few-shot works best Specialized formats, domain-specific terminology, classification tasks with non-obvious categories, or any situation where a wrong output format creates downstream problems. Two to five examples is usually the right range. More than five rarely adds much.

Chain-of-Thought Prompting

Chain-of-thought (CoT) prompting asks the model to reason through a problem step by step before giving its final answer. The simplest form is adding "Let's think step by step" at the end of a prompt, or explicitly asking the model to show its reasoning.

Wei et al. (arXiv:2201.11903) demonstrated that chain-of-thought prompting significantly improves performance on arithmetic, commonsense reasoning, and symbolic reasoning tasks. The key insight: the model produces better answers when it externalizes its reasoning, because each intermediate step constrains what comes next.

Without chain-of-thought:

A store sells apples for $0.50 each and oranges for $0.75 each. If I buy 4 apples and 3 oranges, what is my total?

With chain-of-thought:

A store sells apples for $0.50 each and oranges for $0.75 each. If I buy 4 apples and 3 oranges, what is my total?

Let's think step by step.

With those four words, the model will typically show its work: calculate the apple cost, calculate the orange cost, then add them. Each intermediate result is verified before the final answer. Error rates on multi-step problems drop substantially.

When chain-of-thought works best Math problems, logic puzzles, multi-step planning, debugging, legal or medical analysis where reasoning must be traceable, and any task where the path to the answer matters as much as the answer itself.

Choosing the Right Technique

The choice is not arbitrary. Each technique has a natural home.

TechniqueBest forWhen to avoid
Zero-shotCommon tasks, clear descriptions, general-purpose requestsSpecialized formats, domain jargon, when output structure is critical
Few-shotClassification, specialized terminology, consistent output formatSimple tasks where examples add length without value
Chain-of-thoughtMath, logic, multi-step reasoning, traceable decisionsSimple lookups, creative tasks where rigidity is unwanted

You can also combine techniques. A few-shot prompt that also asks the model to reason step by step is valid and often powerful for complex classification tasks that require justification alongside the label.

Think it through: You need to classify customer emails into 5 categories. Which technique would you use?
Few-shot prompting is the right choice here. You need to show the model what each of your five categories looks like with concrete examples. Without examples, the model will guess at category boundaries and output formats. With two to three examples per category, or at minimum one example per category, it will produce consistent, correctly formatted classifications. Zero-shot would work for broad categories like "positive" or "negative," but five custom categories with specific meanings require examples.
Knowledge check
Which technique asks the model to reason through a problem step by step?
Correct. Chain-of-thought prompting asks the model to show its reasoning before giving a final answer. Wei et al. (arXiv:2201.11903) showed this significantly improves performance on reasoning tasks.
Not quite. Chain-of-thought is the technique that asks the model to reason step by step. Adding "Let's think step by step" to a prompt is the simplest version of this approach.
You are translating product descriptions from English to French. Which technique is most appropriate?
Correct. Translation between major languages is a task the model has encountered extensively during training. Zero-shot with a clear instruction is efficient and accurate here. Few-shot adds length without meaningful benefit for standard translation.
Not quite. Translation is a common, well-represented task in model training data. Zero-shot prompting handles it reliably. You would use few-shot if you had unusual terminology or a very specific style requirement, and chain-of-thought for multi-step reasoning, not translation.
What does Brown et al. (arXiv:2201.11903) establish?
Correct. Brown et al. (arXiv:2005.14165) is the zero-shot and few-shot paper. It demonstrated that large language models can perform tasks with no fine-tuning, using only examples in the prompt.
Check the citation. Brown et al. arXiv:2005.14165 is the paper on zero-shot and few-shot learning in large language models. Wei et al. arXiv:2201.11903 is the chain-of-thought paper. The question asks about the wrong paper citation, so the correct answer covers what Brown et al. actually showed: zero-shot and few-shot generalization.
Before you go
Reflection: Think of one task you do regularly with AI. Would it benefit most from zero-shot, few-shot, or chain-of-thought prompting? What specifically about the task leads you to that choice?
You might also like

Want to apply these techniques to your team's real work? Book a session with Arjun.

Book a call
Was this module helpful?
← Module 2: The Anatomy of a Prompt Module 4: Prompt Patterns →