Chain-of-thought

From llmref.wiki
(Redirected from CoT)
Chain-of-thought — A prompting technique in which the model is guided to produce explicit intermediate reasoning steps before delivering a final answer.

Overview

Chain-of-thought (CoT) prompting is a technique in which a language model is instructed — or shown examples — to articulate intermediate reasoning steps as part of its response, rather than jumping directly to an answer. The technique was formalized by Wei et al. (2022), who demonstrated that CoT substantially improved reasoning accuracy on arithmetic, commonsense, and symbolic reasoning tasks at sufficient model scale.[1]

The core observation is that generating intermediate steps before the final answer functions as an extended scratchpad, helping the model avoid shortcut errors and stay compositionally consistent across multi-step problems.

Variants

Variant Description
Few-shot CoT Include 2–8 examples with reasoning chains; model mimics the format
Zero-shot CoT Append "Let's think step by step" (or equivalent) to the prompt; no examples needed[2]
Self-consistency CoT Generate multiple CoT paths, take a majority vote on final answers
Tree-of-Thoughts (ToT) Branching search over partial reasoning paths; selects the best branch
Extended thinking Model uses a hidden scratchpad (not shown in output) — implemented in reasoning models like o1, R1

Zero-shot CoT is the minimal trigger; few-shot CoT provides more control over the reasoning format.

When chain-of-thought helps

CoT improves performance primarily on:

  • Multi-step arithmetic and algebra.
  • Logical and commonsense reasoning requiring sequential inference.
  • Tasks where errors arise from missing intermediate steps.

CoT does not reliably improve performance on tasks resolvable in a single step, factual lookup, or tasks where the "steps" are non-compositional.

Distinction from related terms

  • CoT is a prompting technique; it is not the same as In-context learning in general — CoT is a specific format within ICL in which examples include reasoning traces.
  • ReAct interleaves CoT reasoning steps with tool actions and observations; it extends CoT into agentic settings.
  • Tree-of-Thoughts (ToT) is a search extension of CoT that explores multiple reasoning paths, not a single chain.

See also

References

  1. Wei, Jason et al. "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models." NeurIPS 2022. https://arxiv.org/abs/2201.11903
  2. Kojima, Takeshi et al. "Large Language Models are Zero-Shot Reasoners." NeurIPS 2022. https://arxiv.org/abs/2205.11916