Reasoning models and test-time compute (also called inference scaling) represent a paradigm where models use additional computation during inference to improve output quality. Instead of a single forward pass, these models explore multiple reasoning paths, verify their own outputs, or iteratively refine responses before producing a final answer.
Key Characteristics
Inference-Time Scaling: Performance improves with more compute allocated at inference time, not just training time
Internal Reasoning: Model engages in self-directed reasoning steps before producing the final output
Verification Loops: Model checks its own work and corrects errors before finalizing
Search Over Outputs: Multiple candidate outputs are generated and the best one is selected
Popular Models
OpenAI o1 / o3: Reasoning models that think before responding, excelling at complex problem-solving
DeepSeek R1: Open-weight reasoning model with chain-of-thought during inference
Claude Opus: Extended thinking mode for complex reasoning tasks
Gemini 2.0 Flash Thinking: Google's reasoning-enabled model with visible thought process
Build This Pattern
Copy this prompt and paste it into Claude Code, OpenCode, Codex, or Cursor to implement this pattern.
Explain reasoning models and test-time compute scaling — the paradigm shift from scaling pretraining to scaling inference-time computation. Architecture: describe how reasoning models are trained via large-scale reinforcement learning to generate extended chains of internal 'reasoning tokens' before producing visible completion tokens, enabling backtracking, self-correction, and multi-step verification. Explain the three scaling laws now recognized in the field: pre-training scaling (bigger model, more data), post-training optimization (RLHF, distillation, fine-tuning), and test-time compute scaling (letting models 'think longer' at inference). Describe OpenAI's o-series approach where the model explores strategies, breaks problems into steps, and identifies errors through RL-trained reasoning traces, with o3 achieving 45.1% on ARC-AGI and breakthrough performance on AIME, Codeforces, and GPQA. Cover DeepSeek R1's pure RL approach using Group Relative Policy Optimization (GRPO) without supervised fine-tuning, achieving o1-matching performance with 70% lower inference cost, and the open-source distillation of R1 to 7B/14B models on consumer hardware. Explain key inference techniques: process reward models (PRMs) that score each reasoning step rather than just the final answer, Monte Carlo Tree Search (MCTS) for exploring multiple reasoning paths, self-consistency ensembles that generate N independent chains and vote, and best-of-N sampling with verifier reranking. Reference representative model families (OpenAI o1/o3/o4-mini, DeepSeek R1, Gemini with 'thinking' mode, Claude extended thinking). Error handling: discuss the variable latency problem where hard problems may take 30+ seconds of reasoning while simple queries need milliseconds, the difficulty of calibrating when to think longer versus when to respond directly, reward hacking where models learn to exploit PRM scoring rather than reasoning correctly, and the token cost explosion where reasoning models generate 10-100x more tokens per query than standard models. Cover failure modes including overthinking simple problems, underthinking hard problems, and reasoning trace degradation on out-of-distribution tasks. Edge cases: handling tasks where reasoning traces are unhelpful (creative writing, open-ended brainstorming), performance on time-sensitive applications where 30-second latency is unacceptable, interaction between reasoning depth and context window limits, and the regulatory challenge where training compute thresholds (EU AI Act) do not capture capability gains from inference-time scaling. Best practices: include guidance on choosing between reasoning and non-reasoning models based on task type (reasoning for math, coding, science, planning; standard for Q&A, creative, summarization), implementing adaptive compute allocation that uses uncertainty estimation to route hard problems to reasoning models, managing cost by setting maximum reasoning token budgets, and using distilled smaller reasoning models for cost-sensitive production deployments. Testing: suggest evaluating on reasoning-specific benchmarks (AIME for math, GPQA for science, Codeforces for coding, ARC-AGI for abstraction), measuring latency distribution across difficulty levels, comparing cost-per-correct-answer against standard models, and testing that reasoning traces are logically consistent rather than just producing correct final answers.