ThinkWithPrompt by SynotticThinkWithPrompt

Few-shot vs chain-of-thought prompting: when to use each

Few-shot prompting shows the model examples; chain-of-thought asks it to reason step by step. What each technique is good at, with examples and when to combine them.

By the ThinkWithPrompt editorial team at Synottic · Updated 11 October 2026

Few-shot and chain-of-thought are two of the most widely used prompting techniques. They solve different problems: few-shot prompting shows the model what the answer should look like; chain-of-thought prompting helps it work out what the answer is.

Few-shot prompting

A few-shot prompt includes one or more worked examples of input and output before your real input. The model follows the pattern it sees. The term was popularised by the 2020 research paper Language Models are Few-Shot Learners (Brown et al.), which showed that large language models can pick up a task from a handful of examples in the prompt.

Use it when the format or style is easier to show than to describe: a house writing voice, a classification scheme, a consistent table layout, or product descriptions that must all follow one pattern.

Classify each piece of customer feedback as Praise, Bug or Feature request. Feedback: "The export button does nothing on Safari." → Bug Feedback: "Love how fast search is now!" → Praise Feedback: "Could you add a dark mode?" → Feature request Feedback: "[NEW FEEDBACK]" →

Tips: use examples that differ from each other in the ways your real inputs will, keep their format identical, and avoid examples so similar to your input that the model simply copies them.

Chain-of-thought prompting

A chain-of-thought prompt asks the model to reason through a problem step by step before giving its answer. The 2022 paper Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (Wei et al.) found that this helps on multi-step reasoning, such as arithmetic and logic problems.

Use it when the route to the answer matters: comparing options, diagnosing a problem, planning in stages, or any question with several dependent steps.

I need to choose between [OPTION A] and [OPTION B] for [GOAL]. Work through this step by step: 1. List the criteria that matter most for this goal. 2. Assess each option against each criterion. 3. Identify the biggest risk of each option. 4. Then give your recommendation and the single reason that decides it.

Many newer models reason step by step on their own, but writing out the steps still helps you control the order of the analysis and check each stage.

Side by side

Few-shotChain-of-thought
What you addWorked examplesA request to reason in steps
ImprovesConsistency of format and styleReasoning on multi-step problems
Good forClassification, templated writing, extractionDecisions, analysis, planning, troubleshooting
CostLonger promptsLonger answers

Combining them

The techniques work together. You can show a worked example that includes its reasoning, so the model copies both the format and the way of thinking. Both also fit inside a role, context, task and format structure: see how to write a good AI prompt.

When neither is needed

For a clear, common request (“summarise this paragraph in two sentences”) a direct, zero-shot instruction is usually enough. Add examples or reasoning steps when the plain version gives you inconsistent or shallow answers.

Frequently asked questions

What is few-shot prompting?

Few-shot prompting means including one or more worked examples of the input and output you want in the prompt, so the model copies the pattern. It is the most reliable way to get a consistent format or style, such as a classification scheme or a house writing voice.

What is chain-of-thought prompting?

Chain-of-thought prompting asks the model to work through a problem step by step before answering. It helps on multi-step reasoning such as comparisons, diagnoses and plans, and makes each stage of the reasoning visible so you can check it.

Chain-of-thought prompts from the library

More guides