Manuscript Offprint

arXiv:2608.24087

Knowing When to Ask for Help: Bayesian Self-Escalation in Hierarchical LLM Agents

Nadeem Shaikh

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Current LLM agent systems decide delegation before reasoning begins (a router picks a model) or after a response is complete (a verifier scores it and may retry). We study a third regime: an agent that recognises, during its own reasoning, that it is unlikely to succeed and transfers control to a stronger model. Our contribution is not the observation that agents can defer to other agents—that is well established—but a decision-theoretic formulation of intra-generation delegation as an optimal-stopping problem over an online estimate of the agent's eventual task success. The junior agent maintains a competence posterior: an abstract Bayesian state whose sufficient statistics are learned from labelled trajectories, not read off raw entropy. It escalates when the expected cost of continuing exceeds the expected cost of deferral. We derive the myopic escalation threshold in closed form, characterise the optimal policy via dynamic programming, and prove—using monotonicity alone, without any concavity argument—that under a conditional-independence signal model the optimal policy is a time-varying threshold on the competence posterior, with no monotone-likelihood or other shape assumption on the raw signal. We further prove that the oracle belief separates at the Chernoff-information rate of the signal, and give a finite-sample guarantee: with n labelled calibration trajectories of length T, the deployed plug-in policy's regret over the oracle is O(Ltlog⁡K/(nT))O(Lt\sqrt{\log K/(nT)}) with high probability. Our central message is a regret bound showing that excess cost is controlled by the calibration of that posterior: better calibration matters more than a smarter router, and “confidently wrong” predictions are the binding failure mode. A simulation study with a known data-generating process confirms each prediction of the theory. A pre-registered protocol yields falsifiable predictions; in this revised version we report a first execution of that protocol on a Qwen2.5-Coder 1.5B→7B code cascade, confirming two of its three predictions: the escalation frontier dominates post-hoc routing at equal cost, and the cumulative competence belief's discrimination rises over the course of generation. The theoretical results are unchanged.

Keywords: LLM agents; hierarchical inference; model cascades; optimal stopping; uncertainty quantification; calibration; selective prediction; learning to defer.

*Version 1.1. Version 1 (DOI: 10.5281/zenodo.21330788) reported no real-model results and pre-registered an evaluation protocol in their place. This version adds a first execution of that protocol on a Qwen2.5-Coder 1.5B→7B code cascade (Section 8), confirming two of its three predictions; the theoretical results are unchanged, and the constant-threshold instantiation tested does not exercise the optimal-stopping dynamic program.

1 Introduction

The economics of large language model (LLM) deployment increasingly favour hierarchies: a small, fast model handles the bulk of traffic while a larger, more capable—and considerably more expensive—model is invoked only when needed. Model cascades and routers realise this idea and can cut inference cost by large factors without sacrificing quality [1, 10, 19]. Almost all such systems, however, make the routing decision either before inference (a router inspects the query and picks a model) or after a full generation (a verifier scores the completed output and may retry). Neither option lets the working model notice, partway through a difficult chain of reasoning, that it has left the region of competence and should hand off.

Many systems already let an agent hand work to another agent or to itself: self-reflection and critic/debate models, verifier-guided generation and best-of-n reranking, speculative decoding with fallback, and adaptive-compute and test-time-scaling methods all revisit or reallocate computation. What is missing across these is a principled, sequential account of when, mid-generation, to stop and defer. We do not claim to introduce agent delegation. We introduce a decision-theoretic formulation of intra-generation delegation in which escalation is an optimal-stopping problem over an online estimate of eventual task success. We refer to the mechanism as self-escalation.

A point we make central rather than incidental: the framework does not assume that raw uncertainty metrics are calibrated. High entropy is not failure and low entropy is not correctness—a model can be confidently wrong. The Bayesian state is therefore an abstract competence posterior whose sufficient statistics (the mapping from a signal history to a probability of success) are learned from labelled trajectories. Per-token entropy or the next-token margin serve only as raw evidence into that learned map, never as the posterior itself. This distinction is what makes the theory meaningful, and it turns out to be the crux: our main result is that the method's cost is governed by how well that posterior is calibrated.

References (21)