Curating Always-Loaded Context for LLM Agents: A Capacitated Assortment Model with Censored Feedback
Abstract
At the start of every session, LLM agents load a fixed context file, such as . Each loaded token in the file is charged again in every later round of the session, and these files can degrade performance as they grow in size. However, in practice, human or automated curators usually grow these files by appending. We formulate context curation as a capacitated assortment problem. Instructions consume tokens under a finite attention capacity; adding an instruction never raises the compliance of the others, while retained instructions incur a per-session setup cost. We prove an upper bound on the optimal file size, regardless of the number of available candidate instructions, and that appending every instruction with positive standalone value can be arbitrarily worse in net value than selecting an optimal subset. A token budget also limits the loss when the token price is underestimated. We then examine what can be learned from past sessions and how this information can guide decisions to add or remove instructions. Feedback is inherently censored: the benefits and harms of loaded instructions are observable, whereas missing instructions generate feedback only when their absence causes harm. In this setting, we show that deleting instructions ignored by agents can inevitably remove helpful ones. We characterize how much evidence should be collected before adding an instruction. Besides, we bound regret when human reviewers can inspect only a limited number of edits per period. Empirical experiments further show that irrelevant rules drawn from real context files reduce language-model compliance.
Create a lesson
Metadata
- Categories
- cs.AI, cs.LG, math.OC
Related papers
Agent-Controlled Forgetting for Tool-Using Agents: Reversible Context Curation in Practice
Shared title terminologycs.AIJan-Peter Franke
DMC-5: Dual-Model Collaboration with Cache-aware Context Compression for Long-horizon Agents
Shared title terminologycs.AIHaochen Li, Xiaobing Tu, Yinggui Wang et al.
Context-Grounded Skill Internalization for Vision-Language Agents
Shared title terminologycs.AIJinlin Liu, Yumeng He, Qihan Huang et al.
Environmental Feedback Modeling Matters: Rethinking Feedback Treatment in Agentic Hindsight Self-Distillation
Shared title terminologycs.AIHangxi Guo, Fengyuan Liu, Yue Wang et al.
From Plausible Hierarchies to Useful Taxonomies: Evaluating Agentic Harnesses on Customer Feedback
Shared title terminologycs.AIPrabhath Chellingi, Raviraja G, Viraj Bagal
Modeling Event-Conditioned Emotional Expression Response with LLM Agents in a Synthetic Social Simulation
Shared title terminologycs.AIRebecca Marigliano, Peter Carragher, Kathleen M. Carley