← Reference · Nestor G Pestelos Jr · Print this page

Artificial Intelligence · Language Models

Chain-of-Thought

Chain-of-thought (CoT) is a sequence of intermediate reasoning steps generated by a language model before its answer. Chain-of-thought prompting asks for this form of response through examples or instructions.[1][2]

Reference entry · last updated 20260909

First principles and definitions

An autoregressive language model predicts each next token from the preceding context. Generated intermediate steps become context for later steps and the answer. CoT prompting changes that context without updating the model's parameters.[1]

Illustrative example

This author-created example shows the response format; it is not a model evaluation.

Problem: Three boxes hold four pencils each. Two pencils are removed. How many remain?

Worked response: The boxes hold 3 × 4 = 12 pencils. Removing two leaves 12 − 2 = 10 pencils. The answer is 10.

Prompting variants

Few-shot CoT: Wei et al. supplied worked examples containing a question, intermediate steps, and an answer. Their experiments found improvements on arithmetic, commonsense, and symbolic reasoning tasks for the tested models.[1]

Zero-shot CoT: Kojima et al. used the instruction “Let's think step by step” without worked examples, followed by an answer-extraction prompt. They reported improvements on several reasoning benchmarks. These results do not establish that the instruction helps every model or task.[2]

Self-consistency

Wang et al. sampled multiple reasoning paths and selected the most common answer. Aggregating over the sampled paths improved accuracy on the tested arithmetic and commonsense benchmarks. It does not verify an answer: several paths can share the same mistake.[3]

Correctness and faithfulness

Correctness concerns whether an answer or step is valid. Faithfulness concerns whether the generated explanation reflects the computation that produced the answer. A plausible explanation alone establishes neither.

Lanham et al. tested faithfulness by intervening on generated chains, including truncating them or inserting mistakes. They found substantial variation across models and tasks. Intermediate text can help a model answer while still being an incomplete or misleading account of its internal computation.[4]

See also

References

  1. Jason Wei et al. (2022). Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.
  2. Takeshi Kojima et al. (2022). Large Language Models are Zero-Shot Reasoners.
  3. Xuezhi Wang et al. (2023). Self-Consistency Improves Chain of Thought Reasoning in Language Models.
  4. Tamera Lanham et al. (2023). Measuring Faithfulness in Chain-of-Thought Reasoning.