Bellman Language Models: Turn Repeated LLM Agent Decisions Into an MDP, Cut Calls by 93-98%
TL;DR: The 2026-10-17 paper arXiv:2610.24871 Bellman Language Models punctures a blind spot — in bounded agent workflows the LLM decision space saturates fast: the same states keep showing up, yet the model re-derives every decision from context each turn. The authors propose Discretize, Then Decide: discretize conversations into states, estimate each action success rate and cost, solve a Markov Decision Process (MDP), then wrap the solution as a controller around the model — known states take a fixed action (tool call / templated reply), only unseen states go to the LLM. The numbers are brutal: on tau2-bench telecom a model-free controller alone solves 79 percent; Qwen3.8-27B as a BLM goes 29 to 96 percent with 93 percent fewer calls; Claude Opus 5.5 cuts per-task calls and cost by about 98 percent. Combined with the real LLM-cost anxiety on Hacker News (2026-10-31) and Microsoft Decision-1, this is the most practical cost-reduction route right now.
1. Background: why agents reinvent the wheel
In bounded workflows (support, ops, ticketing, refunds) the choose-a-tool / pick-a-template decision an agent makes each turn is highly repetitive. But the LLM defaults to treating every decision as brand new, regenerating the answer from the prompt. That equals re-deriving the same arithmetic every turn — slow, expensive, and more error-prone. On HN, We decreased our LLM costs with Opus (2026-10-31) has developers manually routing by model tier (strong model writes the plan, weak model does mechanical work); that is hand-approximating this idea — but manual tiering does not generalize.
2. How it works: Discretize, Then Decide
| Step | What | Gain |
|---|---|---|
| Discretize | read conversations/logs into discrete states, count success rate and cost per action | turn fuzzy context into computable state |
| Solve | build state->action into an MDP, solve optimal policy via value iteration | solve the decision once, reuse forever |
| Control | wrap controller around the model: known state takes fixed action, unknown state falls back to LLM | cut the vast majority of repeated model calls |
Key insight: when writing content is harder than choosing an action (real coding, SymPy derivations), few decisions can be pre-solved and BLM helps little; but when the bottleneck is choosing an action, BLM almost freebies a 90+ percent saving. On InventoryBench the model-free solved policy beats every published method.
3. Tie-in to today's news
Three threads converge this week: the paper (2026-10-17) gives a provable cost ceiling; Hacker News (2026-10-31) Tokenless (YC S26) automatic model switching and Oak (a Git alternative for agents) both orbit the highest-frequency anxiety, agent token cost; and Jiqizhixin (2026-10-31) Microsoft Decision-1, a decision-scoring model that returns calibrated probabilities per option instead of generating natural language — the industrial landing of exactly the turn-decision-into-classification idea inside BLM. All three point the same way: wherever you can avoid an LLM generation, do.
4. Developer checklist
- Audit the logs first: pull your agent workflow logs and see how many decisions are repeated states.
- Define states: use deterministic features (intent class, current stage, error code), never the whole conversation as the state.
- Estimate success and cost: per state, per action, success/total and unit cost; cold-start by running the LLM a few times to probe.
- Solve policy by value iteration: score = success rate minus cost penalty, take the best action; reuse when seen, fall back to LLM when unseen.
- Set a fallback gate: unseen states, low confidence, and any money/permission action go to a strong model plus human review.
- Recalibrate continuously: new logs flow back, recompute policy periodically to avoid drift.
5. Step-by-step: runnable discretize-plus-value-iteration controller and cost estimator
5.1 Minimal BLM controller (runs as-is, stdlib only)
from collections import defaultdict
# 1) discretize real workflow logs into (state -> action -> outcome)
logs = [
("need_refund", "call_tool_refund", True),
("need_refund", "call_tool_refund", True),
("need_refund", "ask_llm", False),
("balance_query", "call_tool_balance", True),
("balance_query", "call_tool_balance", True),
]
stats = defaultdict(lambda: defaultdict(lambda: [0, 0])) # state->action->[success,total]
for s, a, ok in logs:
stats[s][a][1] += 1
if ok:
stats[s][a][0] += 1
# 2) pick the action with highest (success rate - cost penalty); solve once, reuse forever
COST = {"call_tool_refund": 1, "call_tool_balance": 1, "ask_llm": 20}
policy = {}
for s, acts in stats.items():
best, best_score = None, -1
for a, (succ, tot) in acts.items():
score = succ / tot - 0.05 * COST[a]
if score > best_score:
best, best_score = a, score
policy[s] = best
def decide(state):
return policy.get(state, "ask_llm") # unseen state falls back to LLM
print(decide("need_refund")) # call_tool_refund (known state, no LLM call)
print(decide("unknown_state")) # ask_llm (unseen state, fall back to model)
Expected: known states output a fixed tool action with zero model calls; only unseen states go to the LLM. That is the core of solve-once-reuse-thousands.
5.2 Cost estimator (runs as-is, matches the ~93 percent in the paper)
def estimate_savings(baseline_calls, blm_coverage, llm_cost=20, tool_cost=1):
# blm_coverage: fraction of states covered by the policy (no LLM needed)
saved = baseline_calls * blm_coverage
new_cost = (baseline_calls - saved) * llm_cost + saved * tool_cost
old_cost = baseline_calls * llm_cost
return {"saved_calls": int(saved),
"cost_reduction_pct": round(100 * (1 - new_cost / old_cost), 1)}
print(estimate_savings(10000, 0.93)) # about 93 percent cost drop, matching Qwen3.8-27B BLM
Plug in your real baseline_calls and coverage and you get a credible savings invoice — far more convincing than I feel the model is expensive.
6. Recap
| Dimension | One-liner |
|---|---|
| Core | extract repeated decisions into an MDP, solve once, reuse forever |
| Gain | Qwen3.8-27B 96 percent and -93 percent calls; Opus 5.5 -98 percent cost |
| Fits | bounded workflows where the bottleneck is choosing an action |
| Does not fit | free-form generation where the bottleneck is writing content |
| Companions | Microsoft Decision-1, model-tier routing, Tokenless same direction |
Bellman Language Models do not replace the LLM; they wrap it with a controller that says do not think when you should not. Audit logs, define states, solve by value iteration, and you often freebie 90+ percent of cost and latency. Related: The Rise of Decision Models and More Agents Is Not a Silver Bullet.