For years, the AI industry relied on the Pre-Training Scaling Laws: throw more data and compute at the model during training, and it gets smarter. By late 2024, with models like OpenAI o1 and DeepSeek R1, a new axis emerged: Inference Scaling Laws (or Test-Time Compute).
Instead of relying on the model's "System 1" intuition (its immediate next-token prediction), we can engineer "System 2" thinking by allowing the agent to spend exponentially more compute during inference to search, backtrack, and verify its own logic.
This article details how to architect systems that dynamically scale compute on hard problems.
Standard Chain-of-Thought (CoT) asks the model to "think step by step." This is an unguided, forward-only generation. If the model makes a math error at step 2, step 10 is doomed, but the model has no mechanism to halt, reflect, and backtrack.
Test-Time Compute architectures wrap the LLM in a classical search algorithm. The LLM acts as the heuristic generator, while a symbolic engine maintains the search tree.
LATS combines the exploratory power of Monte Carlo Tree Search (MCTS) with the generative power of LLMs. It is the architectural backbone of self-correcting agents.
Why it wins: Unlike Tree-of-Thought (ToT) which searches blindly, LATS uses environmental feedback (e.g., "The compiler threw a syntax error") to assign negative rewards, dynamically pruning dead ends and focusing compute on viable solution paths.
To make tree search work, you need a way to score intermediate steps.
In a custom System 2 agent, you deploy a smaller, specialized LLM (the PRM) whose sole job is to look at the main Agent's proposed next step and output a confidence score [-1, 1]. This score drives the MCTS backpropagation.
The core insight of Test-Time Compute is that verification is computationally cheaper than generation.
It is mathematically easier to verify a correct mathematical proof than to invent one from scratch. By generating thousands of candidate trajectories (generation) and having a PRM score them (verification), we can effectively buy higher intelligence with brute-force inference compute.
A production System 2 agent doesn't use MCTS for every query. It employs a dynamic compute budget:
Test-Time Compute moves AI engineering away from "prompt tweaking" and towards classical search optimization. By treating the LLM not as an oracle, but as a node-expansion heuristic in a vast search tree, we can solve problems that are structurally impossible for standard autoregressive models.