Chain of thought
Chain of thought is when an AI model works through a problem step by step in writing before it gives an answer. Instead of jumping straight to a result, it lays out the intermediate steps, and the answer comes at the end.
It started as a prompting technique: asking a model to “think step by step”, or showing it worked examples, made it noticeably better at math and logic problems. Reasoning models now do this on their own. They’re trained to produce a long chain of thought, often called thinking or reasoning tokens, before they respond.
Why it matters
A model writes one token at a time, and each token depends on what came before it. Writing out the steps gives it room to work, because each intermediate result becomes part of the text it reads while producing the final answer. That’s why chain of thought helps most on multi-step problems like math, planning, debugging and analysis, and helps little on simple lookups or short rewrites.
What it costs
Thinking tokens are billed like other output tokens, and a reasoning model can write many more of them than the visible answer. Thinking also makes responses slower. Many models let you set how much effort they spend on reasoning, and turning it down for routine tasks saves both money and time.
Don’t read it as an explanation
A visible chain of thought looks like the model showing its work, and it’s often useful for spotting where things went wrong. But researchers have found that the written reasoning doesn’t always match what actually drove the answer. A model can reach a conclusion one way and describe a tidier path. Treat the reasoning as a useful clue and still check the answer itself.