Manuscript Offprint

arXiv:2610.24871

Bellman Language Models: Solving the Recurring Decisions of LLM Agents

Adarsh Vatsa, William Eiers

ABSTRACT

A general observation in agentic workflows, especially bounded ones, is that the decision space of the LLM, when we separate a decision from generation, starts approaching saturation: the agent meets the same states again and again, and after enough conversations it stops meeting new ones. LLMs generally don't treat these decisions as an optimization problem and instead re-derive them from their context/prompt on every turn. We show that treating decision making within reasonable bounds as an optimization problem, solving it once, and reusing the solved decisions can often make an agent faster, cheaper and more reliable. Our approach, which we call Discretize, Then Decide, starts from data such as the workflow's own logs or, when none exists, runs of the LLM agent itself. It reads each conversation into discrete states and estimates the probability of each outcome and the cost of each move, until no new states appear and the probabilities stop changing. It then solves the resulting Markov decision process. The solution runs as a controller around the model, sending moves whose content is fixed in the state, such as a tool call or a templated reply, and any state it hasn't seen is sent back to the LLM. We call an LLM run this way a Bellman language model (BLM), after Richard Bellman's equation for the best move in each state.

On τ2\tau^{2}-bench telecom, the controller with no model solves 79% of tasks. As a BLM, Qwen3.8-27B, an open model, goes from 29% to 96% with 93% fewer model calls. For Claude Opus 5.5, which solves 96% of tasks on its own, running it as a BLM cuts model calls and cost per task by about 98% and lets it solve 2 more tasks. On InventoryBench, the solved policy with no model beats every published method. Where the hard part is writing content rather than choosing moves, such as resolving SymPy issues, few decisions can be solved in advance, and a BLM helps little.

1 Introduction

A general observation about LLM agents in bounded workflows is that, once we separate a decision from the generated text used to carry it out, the space of decisions saturates. The agent meets the same states again and again, and after enough conversations it stops meeting new ones.

For example, take an agent on τ2\tau^{2}-bench's telecom domain (Barres et al., 2026) helping a customer who can't send picture messages. A fault is something wrong with the phone or the line that stops picture messages, such as airplane mode left on. A check is a question or instruction to the customer that finds out whether one fault is there, such as asking them to look for the airplane icon.

The agent's replies differ in every conversation, but its decision at each turn is one of a short list. It can look up the account, run one of its checks, fix a fault, take a payment, hand the customer to a human, or close. That's what we mean by a bounded workflow: its moves can be listed.

To choose its next move, the agent needs only a handful of facts. What's the problem, and is it fixed yet? Is anything stopping a fix, such as a locked SIM card? Which checks are left to try? We call each combination of these facts a state.

The replies keep changing, but the states don't. Almost every conversation we collected has messages the agent never sent before, yet on new tasks it almost never meets a state it hasn't met before (Figure 8). One might think that just means the states keep too few facts. But in telecom they keep enough to decide well: a controller deciding from these facts alone, with no model, completes most tasks (Section 6). So the states have to keep exactly what the decision depends on.

Yet LLM agents generally don’t treat these decisions as an optimization problem. They re-derive each one from their context on every turn, with a new call to the model, so they pay for the same decisions over and over.

They also don’t always decide well. Claude Opus 5.5 (Anthropic, 2026) tends to ask about faults that never occur before the most common one. Qwen3.8-27B (Qwen Team, 2026), an open-weights model, mostly fails by handing the customer to a human while there are still checks to try. This isn’t for lack of information. In a simulated coding task where we know the true probabilities, we asked an LLM to estimate them and solved the optimization problem with its estimates. The decisions were as good as with the true probabilities, while the LLM choosing for itself did worse (Section 6).

Decisions that recur like these are what operations research learned to solve. Ordering stock, for example, became a problem with a stated cost of ordering and a stated cost of running out, solved once and applied to every order (Arrow et al., 1951). Dynamic programming did the same for sequences of decisions (Bellman, 1957). Earlier dialogue systems brought this approach to conversations, planning each move with a partially observable Markov decision process (Williams and Young, 2007; Young et al., 2013). But they understood users only through narrow, error-prone components, and mostly replied from templates. LLMs do both well.

So solving recurring decisions once isn't new. What, then, is the contribution of this paper? We show that the idea holds up for LLM agents, and we make it work with them. For people who build agents, that's a recipe that starts from the agent's own logs (Section 8). For people who study them, it's evidence that their decisions recur, and that they don't optimize them.

The key idea is to treat an agent's recurring decisions as an optimization problem: solve it once from data, then reuse the solution instead of re-deriving each decision on every turn. We call this method Discretize, Then Decide. It starts from the workflow's logs, or runs of the LLM agent. As the top of Figure 1 shows, it reads each conversation into discrete states with simple rules, such as regular expressions over messages and tool results. In practice, the rules can be simple, because they only look for the handful of facts the decisions depend on. Whatever they can't read goes to the LLM.

It then estimates, for each move, the probability of each outcome and the move's cost, adding

Figure

Figure 1 Discretize, Then Decide. Top: built once, run every turn. The key point is that when the state fixes the move, the turn never reaches the model. Bottom: tasks solved against agent tokens in telecom, where up and to the left is better. Telling the model the solved policy moves it up. Executing it moves it up and left. Other variants: Table 4.

runs until no new states appear and the estimates stop changing. It solves the resulting Markov decision process for the lowest expected cost. The solution, the solved policy, says which move to make in each state. Whoever runs the agent chooses the unit of cost, such as customer turns in a support conversation. Every move and every outcome has a price in that unit.

The solution runs as a controller around the model. The controller reads every message and tool result into the state. When the state fixes what to send, such as an account lookup or a templated instruction, the controller sends it.

Any other turn, including every turn in a state it hasn't seen, goes to the LLM with the task's prompt and the conversation so far. Crucially, the model is never called on the turns the solved policy decides. We call an LLM run this way a Bellman language model (BLM), after Richard Bellman's equation for the best move in each state (Bellman, 1957). Discretize, Then Decide is how we build one.

This differs from the usual ways of making agents cheaper or more reliable. Routers and cascades choose which model answers each query (Chen et al., 2024; Ong et al., 2025), while a BLM decides whether a turn needs a model at all. Couldn't we just write the solved policy into the prompt? Then the model still decides every turn (Xiao et al., 2024). In our experiments that makes the model more accurate than on its own, but no more efficient. Executing the solved policy does better on both (bottom of Figure 1).

Other systems carry out or enforce a written policy (Bocklisch et al., 2024; Rebedea et al., 2023; Kang et al., 2026; Yu et al., 2026a), or have a model write the agent's program, or compile its tasks or past runs into code (Qi et al., 2026; Winston et al., 2026; AgentJIT Team, 2026). Either way, a person or a model wrote the decisions. In our experiments a coding agent wrote each BLM's rules, templates and solver too. It worked from the workflow's guide, tools and logs (Section 3.10). But no one writes its decisions: the solver, a standard algorithm such as dynamic programming, picks the best move from estimated probabilities and stated costs, as Section 9 explains.

We evaluate BLMs in four domains, chosen to range from nearly all decisions to nearly all content. They are troubleshooting customers' phones in τ2\tau^{2}-bench's telecom domain, ordering stock under uncertain demand and delivery in InventoryBench (Baek et al., 2026), triaging failed test jobs in Mozilla's continuous integration (CI), and resolving SymPy issues. The LLMs are Qwen3.8-27B and Claude Opus 5.5.

In telecom we built the controller three times, each time fixing what the last test showed. We built each from training tasks only, froze it, and then drew its own test tasks at random from the rest. We report them separately, and Appendix A lists every test, each recorded publicly before any result.

In telecom, the controller with no model at all solves most tasks. On a turn where its state doesn't fix the move, it just sends one fixed request and reads the reply. With Qwen3.8-27B writing those turns, it solves about as many tasks as Claude Opus 5.5 alone, with far fewer model calls. Fine-tuning Qwen3.8-27B on Opus's own conversations instead makes it solve fewer tasks than the BLM does, and it still calls the model on every turn. With Opus writing those turns, the BLM removes almost all model calls, cost and waiting time, and solves slightly more (bottom of Figure 1).

On one set of tasks, each with a fault that never appeared in the training data, we ran every task three times. As a Bellman model, Qwen3.8-27B solves nearly all of them on all three attempts, against fewer than half on its own.

How does it handle a fault it never saw? The checks come from the workflow's own guide, not from the data. So the check for a new fault is still on the list, just last, because its fault never occurred in training. The state isn't new either. It holds the kind of problem, whether it's fixed yet and which checks are left, not the fault.

When the whole task is deciding, the solved policy needs little or no model. In inventory control it needs none, and it beats every published method. In test triage it pays an LLM only to read some logs, and the evidence is weaker. There it costs about as much as a fixed rule that reruns a failed test once and then escalates.

Where the hard part is writing content rather than choosing moves, as in resolving SymPy issues, few of the agent's turns are decisions a state can fix. So a BLM helps little. The agent's own logs show this before anyone builds a BLM. Replaying a draft controller over them shows how many of the agent's turns its state would fix. That's nearly all of Opus's turns in telecom, against a small share of the SymPy agent's turns.

The paper makes four claims:

  1. Saturation. Once we separate deciding from writing, a bounded workflow's states saturate, and the text doesn't. We show this in telecom (Observation 1).

  2. Optimality. LLM agents generally don’t optimize their decisions: a solver given the probabilities they state decides better (Observation 2).

  3. Execution. Executing the solved decisions removes the model calls they would cost. Where most of the work is deciding, that removes most of the agent's cost and waiting time, and its accuracy and consistency hold or improve. The gain comes from executing, not from telling the model (Observations 3 to 7).

  4. Prediction. The agent's own logs predict where this pays (Observation 8).

If these claims hold, an agent doesn't have to pay again for states it has met before. Our strongest evidence comes from telecom, where LLMs play the customers, who may vary less than real ones. The other three domains show how far the claims carry, but there we kept test data apart from development less strictly (Section 5.3). Choosing the states is itself an optimization problem, and it isn't the one we solve. When we call a decision optimal, we mean optimal for the states we chose, and Section 11 leaves the best choice of states open.

References (100)

Couldn't load all references. Reload the page to try again.