ENES

Chain of thought

Letting an AI model write out its reasoning step by step before it answers.

A question goes through three written steps before reaching the right answer, while a shortcut straight to the answer lands on a wrong guess

Chain of thought is the intermediate reasoning a language model writes before giving its final answer. Instead of jumping from "a store had 23 apples, used 20 and bought 6 more, how many now?" straight to a number, the model writes "23 minus 20 is 3, plus 6 is 9" and only then answers 9.

It works because a model produces text one token at a time, and each new token can build on everything written before. Writing the steps gives the model room to work: partial results end up on the page instead of having to be held "in its head". A 2022 Google paper showed that just including worked examples like this in the prompt made large models much better at math and logic puzzles; soon after, people found that adding "let's think step by step" helped too.

Today this is often built in. Reasoning models are trained to produce a long chain of thought before answering, and many apps let you see it, or a summary of it. Two cautions: thinking costs time and tokens, so it is not worth it for simple questions; and the written chain is not guaranteed to be the real reason behind the answer. It is useful for checking work, but it is not a perfect window into the model.

Keep in mind

Go deeper

Related terms

More in AI