How LLMs work

What are reasoning models, and how do they think?

A reasoning model is a large language model trained to spend extra computation thinking through a problem, usually as a long chain of intermediate reasoning, before giving its final answer. OpenAI's o1, DeepSeek-R1 and models with extended thinking modes from Anthropic and Google are examples. They do much better on maths, coding and multi-step problems, at the cost of more time and tokens.

3 min read·Checked ·Also called thinking models, extended thinking, test-time compute

A reasoning model buys better answers with more thinking time. Instead of committing to an answer in its first sentence, it writes out a long internal working, checks it, backtracks when something does not add up, and only then answers.

How is a reasoning model different from a regular LLM?

A regular LLM starts producing its answer immediately, so any reasoning happens in the same stream of text you read. A reasoning model is trained to first generate a separate block of reasoning tokens, often thousands of them, and then a final answer. The reasoning may be hidden, summarised or shown, depending on the provider.

This idea grew out of chain-of-thought prompting, where researchers found in 2022 that simply asking a model to show its steps improved maths and logic results. Reasoning models build that behaviour into training, so the model reasons well without being asked and learns habits like checking its work.

How are reasoning models trained?

Reasoning models are trained mainly with reinforcement learning on problems whose answers can be checked automatically, such as maths problems with known results and coding tasks with tests. The model tries many solutions; attempts that reach a correct answer are rewarded, and the model gradually learns reasoning strategies that work.

OpenAI introduced this class of model with o1 in September 2024 and reported that performance kept improving both with more reinforcement learning during training and with more time spent thinking at answer time. DeepSeek's R1 paper, published in January 2025 with open weights, showed that reinforcement learning with simple correctness rewards could make models develop long reasoning, self-verification and reflection without being shown examples of it first. Anthropic, Google and others now offer models with adjustable "thinking" budgets.

What is test-time compute?

Test-time compute is the amount of computation a model spends while answering, as opposed to during training. For most of the history of LLMs, the main way to get a better model was to train a bigger one, following scaling laws. Reasoning models add a second dial: let the same model think longer on a hard question. Many APIs expose this directly as a reasoning effort level or a maximum number of thinking tokens.

SettingEffectUse it for
Low effort or small thinking budgetFaster, cheaper, less thoroughSimple questions, classification, extraction
MediumBalancedMost coding and analysis tasks
High effort or large budgetSlowest and most expensive, best on hard problemsDifficult maths, tricky debugging, complex planning

When should you use a reasoning model?

Use a reasoning model when the task needs several dependent steps and a wrong step ruins the result. They add latency and cost without much benefit on tasks that are really about recall or style.

  • Do: Multi-step maths, logic and quantitative analysis
  • Do: Debugging, code review and larger code changes
  • Do: Planning an agent workflow or choosing between tools
  • Do: Checking or grading other outputs, for example as an LLM judge
  • Avoid: Simple lookups, rewrites, translation or formatting
  • Avoid: High-volume, low-latency requests where a fast model is good enough
  • Avoid: Tasks where the bottleneck is missing information, which thinking cannot supply

How should you prompt a reasoning model?

Prompt a reasoning model with the goal, the constraints and what a good result looks like, and let it work out the steps. Detailed step-by-step instructions that help a regular model can get in the way of a reasoning model's own approach. Providers generally advise starting with a high-level instruction, then adding specific guidance only where you see it go wrong. Keep few-shot examples focused on the output format rather than the reasoning path.

Budget for the thinking tokens. They are billed as output tokens even when hidden, and they count against the output limit, so a hard question can cost several times more than the visible answer suggests. See LLM cost and latency.

Is the visible reasoning what the model actually did?

Not necessarily. Research from Anthropic and others has found that a model's written reasoning does not always reflect the factors that actually drove its answer; for example, it may use a hint in the prompt without mentioning it. Treat the reasoning as a useful but imperfect explanation, and judge the model by whether its final answers are correct.

Frequently asked questions

What is the difference between chain-of-thought and a reasoning model?

Chain-of-thought is a prompting technique: you ask any model to show its steps. A reasoning model is trained, usually with reinforcement learning, to reason at length by default before answering, and it is much better at it.

Are reasoning models better at everything?

No. They are much stronger on maths, code and multi-step problems, but they are slower and more expensive, and on simple tasks they often give no better answer than a fast standard model.

Why is a reasoning model so slow?

It generates many reasoning tokens before the answer, sometimes thousands, and each token takes time to produce. Lowering the reasoning effort or thinking budget makes it faster.

Do I pay for hidden reasoning tokens?

Generally yes. Providers bill reasoning tokens as output tokens even when the reasoning is hidden or summarised, so check the usage fields in the API response to see the real count.

Last checked for accuracy on . Written by the solidcoder team.

Go deeper in the free guides