acceptodds
Under review as a conference paper at ICLR 2027

ConteXtNext: Learning to Predict Context Needs as Knowledge Evolves

Abstract

External memory enables LLM agents to accumulate experience across tasks without updating model parameters. Yet stored experience does not automatically become effective context. Turning accumulated knowledge into useful context requires learning from past usage to guide knowledge selection and composition for subsequent tasks. Knowledge evolution introduces a further difficulty: revisions change the content available for selection, while the feedback guiding selection remains tied to earlier versions. The challenge is to improve the stored knowledge while preserving and updating what has been learned about its use. We introduce ConteXtNext (CXN), a framework for learning to select and allocate context as its knowledge base evolves. CXN decouples free-form knowledge organization from utility estimation, preserving traceable historical evidence across knowledge evolution and reconstructing utility on demand without maintaining persistent, task-agnostic scores. It formulates context construction as budgeted maximization of task-conditioned set utility. Task rewards and retrospective self-assessment provide approximate contribution credit, while coverage evidence accounts for overlap within candidate contexts. These estimates guide the selection of complementary knowledge through predicted marginal gains in set utility, with the initial context budget adapted to the information demands of related past tasks. We evaluate CXN across three task domains: AppWorld, CRMArena-Pro, and KernelBench. Across the evaluated LLM configurations, CXN improves task success over no-memory baselines by up to 18.7, 37.5, and 11.0 percentage points, respectively. Further analysis on KernelBench shows that CXN's performance gains are accompanied by lower context consumption. CXN uses the fewest context tokens among the compared methods, consuming only 25.2% of the no-memory baseline's context tokens while increasing task success from 74% to 85%.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.