Chain-of-Thought Prompting

Category: Reasoning & decomposition

Chain-of-thought prompting asks the model to work through intermediate reasoning steps before giving a final answer. Making the reasoning explicit substantially improves performance on arithmetic, commonsense, and multi-step problems.

What it is

Chain-of-Thought Prompting

Chain-of-thought (CoT) prompting elicits a series of intermediate reasoning steps rather than jumping straight to an answer. Wei et al. showed that prompting large models to "think step by step" — either by demonstrating reasoning in examples or by a simple zero-shot instruction — unlocks reasoning abilities that direct-answer prompting leaves untapped.

The explicit trace gives the model room to decompose the problem, track intermediate results, and arrive at a more reliable conclusion. It also makes the model's process auditable, which helps with debugging and trust.

When to use

How it works

  1. Instruct the model to reason step by step before answering, or demonstrate the reasoning in examples.
  2. Let the model generate intermediate steps that build toward the solution.
  3. Have it state the final answer clearly, separated from the reasoning.
  4. Optionally parse only the final answer for downstream use while keeping the trace for review.

Illustrative structure

The structure appends a reasoning directive to the task: "[question] Let's think step by step." — or, in few-shot form, each example shows the worked steps ("First… then… therefore…") before its answer, so the model mirrors that reasoning shape on the new question.

Pitfalls

Frequently asked questions

What is Chain-of-Thought Prompting?

Chain-of-thought prompting asks the model to work through intermediate reasoning steps before giving a final answer. Making the reasoning explicit substantially improves performance on arithmetic, commonsense, and multi-step problems.

When should you use Chain-of-Thought Prompting?

The problem requires multiple steps: arithmetic, logic, planning, or multi-hop reasoning. Direct answers are frequently wrong or skip necessary intermediate work. You need a visible reasoning trace to audit or debug the model's process. The task benefits from the model "showing its work" before committing to an answer.

What are common pitfalls of Chain-of-Thought Prompting?

Verbose reasoning increases tokens, latency, and cost; not every task needs it. A fluent-looking chain can still reach a wrong answer — reasoning is not a correctness guarantee. Very small models benefit far less; CoT is an emergent behavior of larger models. Exposing the full chain to end users may leak intermediate errors or sensitive intermediate steps.

Sources

Related techniques

← All prompt engineering techniques

Apply Chain-of-Thought Prompting with Prompeteer, the Agentic Contextual AI Platform →