What Are Reasoning Models? Chain of Thought and Test-Time Compute
By LatestLLM Editorial · Published · Facts verified · 8 min read
Also called: chain of thought, thinking models, test-time compute, o1, DeepSeek-R1, reasoning tokens, inference-time scaling
Before this: Fine-tuning and RLHF, Next-token prediction
In one line
A reasoning model is a language model trained to write out a long chain of thought before its final answer, spending extra tokens at answer time to solve harder problems.
Reasoning models, simply and technically
In plain English
Some questions cannot be answered well in a single glance, such as a maths competition problem or a tricky piece of code. A reasoning model handles them the way a person does: it works through the problem on scratch paper first. It writes out steps, tries an approach, checks it, backs up if it goes wrong, and only then gives the final answer.
That scratch work costs extra words and time, so reasoning models are slower and pricier than ordinary ones. In exchange they are far better on problems that need several steps. Models like OpenAI's o1, DeepSeek-R1 and gpt-oss work this way, and some chat models let you switch the thinking on or off.
Think of it like this: Answering a hard question without thinking is like blurting the first number that comes to mind in a mental-arithmetic quiz. A reasoning model is allowed to use scratch paper: it writes the steps, notices a slip, fixes it and then states the answer. More scratch paper usually means more right answers, with diminishing returns. The comparison fails in one respect: the model's written steps are not always a faithful account of how it really got its answer.
Everyday example: Scratch paper for a puzzle
A model is asked a multi-step word problem about trains meeting each other.
Input:
A multi-step word problem
Output:
Long hidden working, then a short final answer
What it shows: An ordinary model answers in a line, sometimes wrongly. A reasoning model first writes a long block of working: it sets up the distances, solves, checks the result against the question, finds it forgot a unit conversion and corrects it. Only the final answer, and sometimes a summary of the working, is shown to the user.
Technically
Chain-of-thought prompting (Wei et al. 2022) showed that generating intermediate reasoning steps improves performance on arithmetic, commonsense and symbolic tasks in large models; self-consistency (Wang et al. 2022) samples several chains and takes the most common answer, adding 17.9% on GSM8K. Reasoning models internalise this by training. DeepSeek-R1-Zero applied large-scale reinforcement learning with checkable rewards directly to a base model: its pass@1 score on AIME 2024 rose from 15.6% to 71.0% during training, and to 86.7% with majority voting over 64 samples. OpenAI reports that o1's performance improves with more RL (train-time compute) and with more time spent thinking (test-time compute).
Snell et al. (2024) study how to spend inference compute optimally and find that doing so can be more effective than scaling model parameters. In practice the thinking is a sequence of reasoning tokens, hidden or visible, that occupy space in the context window and, in OpenAI's API, are billed as output tokens. DeepSeek-R1-Zero's raw output suffered poor readability and language mixing, which the full R1 pipeline addressed with additional training stages. gpt-oss models are open-weight reasoning models, and Gemma 4 has a thinking mode.
Technical example: Why sampling and voting helps
The probability that a majority of n independent samples is right when each is right with probability p and wrong answers agree, computed exactly with the binomial formula. This is an idealisation: real questions differ in difficulty and errors are correlated.
Code (python):
from math import comb
def majority(p, n):
return sum(comb(n, k) * p ** k * (1 - p) ** (n - k) for k in range(n // 2 + 1, n + 1))
for p in (0.55, 0.71):
row = ", ".join(f"n={n}: {majority(p, n):.3f}" for n in (1, 5, 15, 65))
print(f"per-sample accuracy {p}: {row}")
print("DeepSeek-R1-Zero on AIME 2024 (reported): 1 sample 0.710, majority of 64 samples 0.867")
Output:
per-sample accuracy 0.55: n=1: 0.550, n=5: 0.593, n=15: 0.654, n=65: 0.791
per-sample accuracy 0.71: n=1: 0.710, n=5: 0.850, n=15: 0.959, n=65: 1.000
DeepSeek-R1-Zero on AIME 2024 (reported): 1 sample 0.710, majority of 64 samples 0.867
What it shows: With independent samples, a 71% solver would reach over 99% by voting among 65, but R1-Zero reached 86.7%. The gap is real: hard questions have a per-sample chance below 50%, where voting makes things worse, and mistakes are often shared. Voting buys the most on questions the model already gets right more often than not.
Thinking out loud
In plain English: A model can only write one word at a time, so a hard problem solved in a single word is a gamble. If it first writes its steps, each step becomes part of the text it can read, so later steps can build on earlier ones. The written steps are the model's working memory.
Technically:
Each generated token costs one forward pass, so a model gets only a bounded amount of computation per token. A chain of thought lets it spend many more passes on a problem and store intermediate results in text. Wei et al. showed that such reasoning emerges in sufficiently large models via a simple method, chain-of-thought prompting: a 540B-parameter model prompted with eight exemplars reached state-of-the-art accuracy on the GSM8K maths word-problem benchmark.
Reasoning models make this the default behaviour rather than a prompting trick, and they usually produce far longer chains than prompting does, with checking, backtracking and alternative attempts.
What is chain of thought?
A series of intermediate reasoning steps the model writes before its final answer.
Training to reason
In plain English: Researchers found they could grow this behaviour with trial and error. Give the model problems whose answers can be checked automatically, such as maths and code, reward it when it gets them right, and over thousands of rounds it learns to think longer and verify its work.
Technically:
DeepSeek-R1 showed that reasoning abilities can be incentivised through pure reinforcement learning, without human-annotated reasoning steps. Rewards come from verifiable outcomes such as a matching final answer or passing tests. R1-Zero's AIME 2024 pass@1 rose from 15.6% to 71.0% over thousands of RL steps, comparable to OpenAI-o1-0912, but its text was hard to read and mixed languages, so R1 adds cold-start data and further SFT and RL stages.
The same report distilled R1's outputs into six smaller dense models, and found that distillation into Qwen2.5-32B outperformed running RL on that model directly, so reasoning is often cheaper to copy than to discover.
Go deeper: details for practitioners
- OpenAI's description of o1 says performance smoothly improves with both train-time compute (more reinforcement learning) and test-time compute (more thinking).
Test-time compute
In plain English: A reasoning model gives you a dial: spend more thinking on a hard question and you usually get a better answer. That is a new way of buying quality, besides training a bigger model.
Technically:
Snell et al. studied how to allocate fixed inference compute, comparing sequential refinement, parallel sampling with verifiers and search, and found that scaling test-time compute optimally can be more effective than scaling model parameters, with the best strategy depending on the question's difficulty.
Parallel methods such as self-consistency run many independent chains and vote or score them. The curve in the figure is the idealised case; real gains are smaller because difficulty varies across questions and wrong answers often coincide.
Everyday example: Dial it up for hard questions
A service lets a user choose how long a model may think.
What it shows: For a simple lookup, a short think is enough and cheap. For a tricky proof, a long think pays off, though after some point more thinking adds little.
Costs and limits
In plain English: Thinking is not free: every word of scratch work is a word the service must generate, store and sometimes bill for. The scratch work can also be wrong or misleading, and it may not always reflect the real reason for an answer.
Technically:
Reasoning tokens are not visible through OpenAI's API but still occupy space in the context window and are billed as output tokens, so latency and cost scale with the amount of thinking. A long chain also competes with the prompt for the context window.
Chains of thought are not guaranteed to be faithful: a study of reasoning models found that they often did not verbalise hints they had used, with reveal rates frequently below 20%. Text that looks like an explanation is therefore weak evidence of the model's actual process.
What are reasoning tokens?
Tokens a reasoning model generates while thinking, before the visible answer. They take context space and are billed as output.
Common misconceptions
Myth: A reasoning model understands the problem like a person.
Reality: It generates a long chain of text that makes correct answers more likely. The chain improves results but is not a guaranteed record of its internal process.
Myth: More thinking always gives a better answer.
Reality: Gains diminish, and a model that is almost always wrong on a question rarely fixes it by thinking or voting.
Myth: Reasoning models are just chain-of-thought prompts.
Reality: They are trained, often with reinforcement learning on checkable problems, to produce long reasoning chains by default.
Where you'll see this
- DeepSeek-V3 architecture: DeepSeek-R1 shares V3's architecture and adds reasoning through reinforcement learning.
- gpt-oss architecture: gpt-oss is a family of open-weight reasoning models.
- Gemma 4 architecture: Gemma 4 adds a thinking mode that writes a reasoning chain before the answer.
Key takeaways
- A reasoning model writes a long chain of thought before answering, trading extra tokens and time for accuracy on multi-step problems.
- DeepSeek-R1-Zero's AIME 2024 pass@1 rose from 15.6% to 71.0% through reinforcement learning, and to 86.7% with majority voting over 64 samples.
- Reasoning tokens occupy the context window and, in OpenAI's API, are billed as output tokens, so thinking costs real money and latency.
- Voting and sampling help most where the model is usually right; they cannot fix a question it nearly always gets wrong.
Frequently asked questions
What is a reasoning model?
A language model trained to generate a long chain of thought before its final answer, so it can solve multi-step problems more accurately.
What is test-time compute?
The computation spent when answering, such as generating long reasoning or sampling many answers, as opposed to compute spent training the model.
Why are reasoning models slower and more expensive?
They generate many more tokens per answer, and reasoning tokens are billed as output tokens in OpenAI's API.
How did DeepSeek-R1-Zero learn to reason?
Through reinforcement learning with automatically checkable rewards on problems such as maths, without human-written reasoning steps.
Can I trust the reasoning shown?
Treat it as useful but not authoritative. Studies find that chains of thought often omit factors that actually influenced the answer.
Sources
Facts last verified November 23, 2026.
- DeepSeek-AI: DeepSeek-R1, Incentivizing Reasoning Capability in LLMs via Reinforcement Learning (arXiv)
- Wei et al.: Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (arXiv)
- Wang et al.: Self-Consistency Improves Chain of Thought Reasoning (arXiv)
- Snell et al.: Scaling LLM Test-Time Compute Optimally (arXiv)
- OpenAI: Learning to reason with LLMs
- Chen et al.: Reasoning Models Don't Always Say What They Think (arXiv)