🤖 AI Summary
This work addresses the challenge of dynamically coordinating context, prompts, and tool invocations for large language model (LLM) agents under resource constraints in multi-turn interactions. It introduces a Stackelberg game formulation into LLM resource scheduling and proposes a context-aware, repairable conditional policy framework: a controller sets quality–cost objectives, and an executor dynamically allocates resources accordingly. Strategy repair is achieved through learning conditional response models, optimizing the leader’s policy, and integrating real-API calibration with projection onto safe action sets. Theoretical analysis establishes guarantees on equilibrium existence, response stability, and environmental transferability. In 300-round real-API experiments, the repaired policy reduces token cost by 17.4% on average compared to a conservative baseline (p = 0.022) without significant degradation in output quality (p = 0.44).
📝 Abstract
Large language model (LLM) agents increasingly operate as multi-turn systems that must allocate context, prompt verbosity, and tool access under finite computational budgets. Static thresholds are simple, but they are brittle under heterogeneous tasks and evolving session states. We formulate resource governance as a contextual Stackelberg game: a controller commits to a quality target and a cost incentive, while an executor responds with resource actions over context, prompting, and tool usage. We learn a conditional response model, optimize a leader policy against that model, and repair the resulting policy using real-API calibration and projection onto an empirically selected action set. For the restricted game, we establish conditional guarantees for equilibrium existence, follower-response stability, safe-set projection, and transfer from a surrogate environment to the real environment under bounded value error. The primary real-API experiment comprises 300 evaluated turns. Relative to a conservative baseline, the selected repaired controller reduces mean token cost by 17.4% (Welch $p=0.022$), while the measured quality difference is not statistically significant ($p=0.44$). The theoretical results are conditional and the experiments do not estimate their regret or transfer constants; consequently, the evidence establishes a promising repaired operating point, not a certified real-system equilibrium.