Back to the wiki

Chain of thought

Asking the AI to think out loud before answering.

The analogy

At school, giving the result wasn't enough — you had to show your work. When a model “shows its work” — writing the intermediate steps before the conclusion — it makes far fewer mistakes, just like you catch errors sooner when you solve a problem in parts.

In detail

Because the model generates token by token, writing intermediate steps gives it extra “computing room”: each step builds on the previous ones. Asking it to “reason step by step” improves results in logic, math and planning. Recent reasoning models already do this internally by default.

An example

Direct question: “What's 17 × 24?” may fail. “Solve it step by step” → “17 × 24 = 17 × 20 + 17 × 4 = 340 + 68 = 408”. Same model, different method, correct result.

Related concepts