Legacy Concept Lab

Chain-of-Thought Prompting

Dramatically improves reasoning performance—math, logic, coding

Concept 75 of 100Scaling & AlignmentPhase 11
#75CoTScaling & Alignment
key equationP(answer | question, reasoning)
Phase 11: Frontier research & scalingConcept 75 of 100

Why It Matters for Modern Models

  • Dramatically improves reasoning performance—math, logic, coding
  • Emergent capability: only works well in large models (>100B parameters)
  • Foundation for o1-style reasoning: explicit intermediate computation steps

What Tutorials Skip

What is still poorly explained in textbooks and papers:

  • CoT gives the model "scratchpad" space for intermediate computation
  • The reasoning doesn't need to be human-readable—it just needs to help the model
  • Self-consistency leverages diversity: different reasoning paths vote on the answer

Interactive Visualization

Core Math (Optional Deep Dive)

If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.

Key Equation
P(answerquestion,reasoning)P(answer | question, reasoning)

Chain-of-Thought: Prompt model to show reasoning steps:

P(answerquestion)P(answerquestion,reasoning)P(answer | question) \to P(answer | question, reasoning)

Self-Consistency: Sample multiple reasoning paths, majority vote:

answer=argmaxai=1N1[ai=a]answer^* = \arg\max_a \sum_{i=1}^N \mathbf{1}[a_i = a]

where aiP(aq,ri)a_i \sim P(a | q, r_i) with reasoning path rir_i.

Decomposition: Break complex problem into sub-problems:

P(yx)=t=1TP(yty<t,x)P(y | x) = \prod_{t=1}^T P(y_t | y_{<t}, x)

Canonical Papers

Chain-of-Thought Prompting Elicits Reasoning in Large Language Models

Wei et al.2022NeurIPS
Read paper →

Self-Consistency Improves Chain of Thought Reasoning

Wang et al.2023ICLR
Read paper →

Connections

Next Moves

Explore this concept from different angles — like a mathematician would.