Chain of thought and reasoning
Intermediate steps as computation, self-consistency, and limits of chain faithfulness.
From a direct answer to steps
The language model as a policy reads its context and commits to an action in a few tokens. Each of those tokens is one forward pass of a fixed stack of layers. When the right answer needs several dependent steps — arithmetic in a word problem, a chain of facts — the model has only that fixed depth before the first answer token. Chain of thought gives it a scratchpad: write the intermediate steps first, then the answer.
On GSM8K, PaLM 540B with eight standard question–answer examples solved 17.9% of the test set; the facts and arithmetic were there, the place to compute was not.
Few-shot and zero-shot CoT
Key idea. Change only the exemplars (or one instruction) so each answer is preceded by the steps that lead to it. Generated tokens re-enter as inputs, so later positions can use earlier results.
Few-shot CoT (Wei et al., 2022) shows worked solutions in words. With eight examples on GSM8K: LaMDA 137B 6.5% → 14.3%, GPT-3 175B 15.6% → 46.9%, PaLM 540B 17.9% → 56.9%. Gains grew with scale; below ~100 B fluent wrong chains often did not help. Ablations: equation only, a row of dots of the same length, or reasoning after the answer all stayed near 6% — content before the answer matters.
Zero-shot CoT (Kojima et al., 2022) appends “Let’s think step by step.” and extracts the answer with a second prompt. With text-davinci-002, GSM8K rose from 10.4% to 40.7%. Instruction-tuned models often emit such chains unprompted.
Intermediate tokens and depth
A transformer computes token with layers; without intermediates the first answer token is a depth- circuit of the question. A generated token is a full pass of layers and becomes input to every later position:
A 12-layer model after 60 reasoning tokens has about sequential layer applications before the answer starts. Theory (Li et al., 2024): constant-depth transformers answering directly stay in a weak circuit class; with CoT they can solve problems that size- boolean circuits solve. Extra tokens are necessary but not sufficient: prompted models do not turn meaningless fillers into useful compute the way densely supervised ones sometimes can.
Self-consistency: voting
A reasoning path is a means to an answer. The answer we want maximises the marginal . Greedy decoding approximates the single most probable path, which can disagree when many paths reach the right answer and one popular path is wrong.
Self-consistency (Wang et al., 2023): sample paths at temperature , parse each answer, return the plurality:
On GSM8K with PaLM 540B, 40 samples raised accuracy from 56.5% (greedy CoT) to 74.4%. Weighting votes by path probability did not help over a plain count.
How much the vote helps
With two outcomes and independent samples each correct with probability , and majority accuracy (ties by a fair coin) is
For , : . The vote amplifies whichever side is ahead; even adds nothing over under coin-flip ties; Hoeffding gives exponential error decay for . With scattered wrong answers, plurality can converge to the correct mode even if . Over a dataset the curve flattens at the share of questions whose mode is correct.
Decomposition and search
Least-to-most (Zhou et al., 2023): first decompose into subquestions, then answer them in order with earlier answers in context — strong when the test instance is harder than any exemplar (SCAN length split: 99.7% vs ~16% for CoT).
Tree of Thoughts (Yao et al., 2023b): nodes are partial solutions; the model proposes successors and rates them; BFS/DFS with backtracking. Same line as classical search with the LM as successor and heuristic — developed further in Planning with language models.
Faithfulness and next
A written chain is generated text. Biased few-shot contexts can steer answers while chains rationalise without naming the bias (Turpin et al., 2023). Interventions on the chain change the answer on some tasks and barely on others (Lanham et al., 2023). For agents, traces are evidence for debugging — not proof. Safety arguments that rely on reading the chain need the chain to be necessary for the task.
Cost, error propagation along a chain, and tasks where deliberation hurts remain limits. Everything here is prompting a fixed model; Reasoning models later train long chains with RL.
The model can now think before it answers, but only with what it already knows. Next: tool use and function calling — typed tools, a round trip through the runtime, and constrained decoding.
Check your understanding
The same questions as in Pulse. Answers are shared between modes.
Answers are saved on the server and tied to this browser until you sign in.