I · ReasoningMature★★

Chain of Thought

also known as CoT, Step-by-Step Prompting

Elicit multi-step reasoning by prompting the model to produce intermediate steps before its final answer.

This pattern helps complete certain larger patterns —

  • used-byScratchpad★★Give the agent a writable scratch space for intermediate notes that informs later turns but does not pollute the response.
  • used-bySTaR BootstrappingBootstrap a model's reasoning by training it on its own correct chain-of-thought outputs.

Context

A team is using a large language model on a task whose answer is not a single fact lookup but the end point of a short reasoning trail: a multi-step arithmetic word problem, a logical deduction with several premises, or a question that requires combining two or three facts the model already knows in isolation. These are tasks that a person working them out on paper would normally pause to write a few intermediate lines for before stating the final answer.

Problem

When the prompt shows the model only example pairs of (question, final answer) and asks for the next final answer directly, the model tends to skip straight to a single output token. Because the correct answer depends on a chain of intermediate inferences that have to be carried in working memory, jumping to the answer in one step produces confidently wrong results on anything beyond the simplest case. The reasoning never becomes a token the model can attend to, so it has no opportunity to use what it actually knows one step at a time.

Forces

  • Longer outputs cost more.
  • Wrong reasoning chains can produce confidently wrong answers.
  • Few-shot exemplars are dataset-specific; zero-shot triggers generalise but lose accuracy.

Example

A maths-tutoring assistant keeps blurting wrong answers to multi-step word problems because it tries to jump straight from 'Maria has...' to a single number. The team adds Chain-of-Thought prompting with a few worked exemplars, asking the model to write out each intermediate quantity before stating the final answer. Accuracy on the same problem set improves substantially because the answer now depends on reasoning steps the model can attend to one at a time, instead of being collapsed into a single output token.

Diagram

Solution

Therefore:

Prompt the model with exemplars showing intermediate reasoning, or use a zero-shot trigger ('Let's think step by step') before answering. The reasoning trace is visible and parseable.

What this pattern forbids. The model is required to emit reasoning before the final answer; one-shot answer-only generation is forbidden by prompt design.

The smaller patterns that complete this one —

  • generalisesTree of ThoughtsSearch over a tree of partial reasoning states with explicit lookahead, evaluation, and backtracking.
  • generalisesZero-Shot Chain-of-Thought★★Elicit step-by-step reasoning with a single trigger phrase rather than few-shot exemplars.

And the patterns that stand alongside it, or against it —

  • complementsSelf-Consistency★★Sample the same question multiple times at non-zero temperature and aggregate by majority or judge to mitigate hallucination.
  • alternative-toLeast-to-Most PromptingDecompose a hard problem into an ordered list of easier subproblems, then solve them sequentially with each answer feeding the next.
  • complementsExtended Thinking★★Spend a configurable budget of internal reasoning tokens before producing a user-visible answer.
  • alternative-toLatent-Space Reasoning·Let the model reason in continuous hidden-state space instead of decoding each step to text, feeding the last hidden state back as the next input embedding, so one latent step can hold several continuations.

Neighbourhood

Click any neighbour to follow the language. Scroll to zoom, drag to pan.