# What is chain-of-thought reasoning?

Having a model write out the steps of its reasoning before it gives an answer. Once a prompting trick, now built into "thinking" models.

- Page: https://tecyfy.com/concepts/chain-of-thought
- Subject: How AI works (https://tecyfy.com/concepts)
- Level: intermediate
- Also called: Chain-of-Thought Prompting, CoT, Thinking, Reasoning
- The lesson: How AI writes its answers: one piece at a time (https://tecyfy.com/learn/how-ai-works/how-ai-writes)
- Last checked: 2026-10-14

Ask a person "what is 17 times 24?" and most will not answer at once. They work it out in steps: 17 times 20, then 17 times 4, then add. A language model gets more of these questions right when it does the same, writing the steps out before the answer. That written-out working is a chain of thought.

## Where the idea came from

In 2022 a team of researchers, with Jason Wei as first author, showed a model a handful of worked examples where the answer came after the reasoning, then gave it a new problem. The model copied the pattern, wrote its own steps and solved far more problems. With 8 such examples, their largest model set a new best score on a standard set of school maths word problems.

Why does it work? A model writes one [Token](https://tecyfy.com/concepts/token) at a time, and each token is predicted from everything written so far. Steps on the page give the next prediction more to stand on. A model that jumps straight to "408" has to get it in one guess.

## From trick to built-in

You rarely need to ask for it now. Today's "thinking" or "reasoning" models are trained to do this by themselves. OpenAI trains its reasoning models to think before they answer and to spot and fix their own mistakes along the way. Claude decides for each request whether to think and how much: a simple fact may get none, a hard maths problem a lot.

## What it costs

Thinking is written text, so it is paid for as output, the expensive kind of [Token](https://tecyfy.com/concepts/token). It also takes time. A long chain of thought on a short question is waste, which is why some makers let you pick an effort level. Kimi K3, for one, offers low, high and max.

## How to use it

For a question with several steps (a calculation, a plan, a comparison, a bug) give the model room to think, or turn thinking on. For a quick fact or a rewrite, leave it off. And read the reasoning when it is shown: a wrong step on the way is often easier to spot than a wrong answer at the end.

## Related

- [Prompt Engineering](https://tecyfy.com/concepts#prompt-engineering): Crafting input prompts to steer generative models toward desired outputs
- [Large Language Model](https://tecyfy.com/concepts/large-language-model): A model trained on a huge amount of text to predict the next token. Further training turns it into an assistant that follows instructions.
- [Token](https://tecyfy.com/concepts/token): The small piece of text a language model reads and writes, often part of a word. Prices, limits and the context window are all counted in tokens.
- [Self‑Consistency](https://tecyfy.com/concepts#selfconsistency): An inference‑time strategy that samples multiple reasoning paths and selects the answer occurring most often.

## Sources

- [Chain-of-Thought Prompting Elicits Reasoning in Large Language Models](https://arxiv.org/abs/2201.11903), Jason Wei and others, arXiv 2201.11903, 2022-01-28. Generating a chain of thought, a series of intermediate reasoning steps, significantly improves the ability of large language models to perform complex reasoning. It improved arithmetic, commonsense and symbolic reasoning in 3 large models. A 540-billion-parameter model prompted with 8 worked examples reached state-of-the-art accuracy on the GSM8K maths problems.
- [GPT-6 Astra system card, model data and training](https://deploymentsafety.openai.com/gpt-6-astra/model-data-and-training), OpenAI, 2026-09-03. OpenAI's reasoning models are trained to reason through reinforcement learning. They are trained to think before they answer, and learn to refine their thinking, try different strategies and recognise their mistakes.
- [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking), Anthropic, Claude API documentation, 2026-09-25. Claude decides for each request whether to think. A simple factual question may get an answer with no thinking, and a multi-step maths problem gets deeper reasoning.
- [Thinking models](https://platform.kimi.ai/docs/guide/use-thinking-models.md), Moonshot AI, Kimi API documentation, 2026-09-25. A thinking model breaks the problem down, plans steps and weighs alternatives before it answers. This improves results on complex reasoning and code, at the cost of more time and more tokens.
- [Kimi K3 quickstart](https://platform.kimi.ai/docs/guide/kimi-k3-quickstart.md), Moonshot AI, Kimi API documentation, 2026-09-25. Kimi K3 always has thinking mode on, and its reasoning effort can be set to low, high or max.
- [Reasoning tokens](https://openrouter.ai/docs/use-cases/reasoning-tokens), OpenRouter documentation, 2026-09-25. Reasoning tokens are counted as output tokens and charged as output tokens.
