Sculptor: Empowering LLMs with Cognitive Agency via Active Context Management

Ting Cao 曹婷, Mo Li, L. H. Xu, Qitai Tan, Ting Cao, Yunxin Liu

Introduction

As the field of Large Language Models (LLMs) pushes toward increasingly massive context windows, a critical bottleneck has emerged: proactive interference. This phenomenon occurs when irrelevant or outdated information within a long prompt disrupts the model's ability to reason about new data. Simply expanding the token limit often exacerbates this issue, leading to "attention dilution" and the well-documented "lost in the middle" problem. While external retrieval systems like RAG provide some relief, they do not address the core problem of a cluttered internal "working memory."

To address this, we introduce Sculptor, a framework that shifts LLMs from passive recipients of long contexts to active managers of their own cognitive space. By providing models with the agency to curate their context, Sculptor enables them to focus on relevant information while discarding noise.

Active Context Management (ACM)

The core of the Sculptor framework is Active Context Management (ACM). In this paradigm, the LLM acts as a "sculptor," systematically removing irrelevant "marble" (textual noise) to reveal the "statue" (the correct response). This is achieved through a specialized tool suite that allows the model to manipulate its conversational history dynamically.

Overview of the Sculptor framework, illustrating the transition from an overloaded initial context to an optimized, sculpted context through active tool use.

The Sculptor Tool Suite

The model is equipped with six deterministic tools designed for non-destructive context curation:

  1. Context Fragmentation (fragment_context): Segments long text into manageable pieces with unique identifiers.
  2. Compression & Restoration: Models can use summarize_fragment for AI-powered summaries and fold_fragment to hide text, reducing clutter. Crucially, restore_fragment allows the model to retrieve hidden information if it realizes it is needed later.
  3. Precise Search: Tools like search_context and get_search_detail function similarly to a "Ctrl+F" command, allowing the model to pinpoint specific facts without re-reading the entire history.

Training via Dynamic RL

To optimize tool usage, we employed Group Sequence Policy Optimization (GSPO) with a novel Incremental Loss Assignment strategy. This approach addresses the "non-monotonic" nature of context management—where hiding text makes subsequent context shorter—ensuring stable reinforcement learning even when the model's input size fluctuates during a trajectory.

Experimental Results

Sculptor was evaluated across five diverse long-context benchmarks, including PI-LLM (proactive interference testing) and NeedleBench (multi-needle reasoning).

Performance and Accuracy

The impact of active management is most visible in complex reasoning tasks. On the PI-LLM benchmark, a 13B model (Sculptor-M3-RL) improved from a baseline accuracy of 22.5% to a near-perfect 99.4%. In multi-needle reasoning tasks, which require connecting disparate facts buried in long text, models using Sculptor maintained significantly higher accuracy as context length increased compared to vanilla baselines.

Performance comparison on multi-needle reasoning tasks, showing Sculptor's ability to maintain high accuracy even as context length increases to 128k tokens.

Efficiency and Cost Reduction

Beyond accuracy, Sculptor offers massive gains in computational efficiency. By actively "folding" irrelevant content, the framework achieved context reductions of 89% on PI-LLM and 76.2% on NeedleBench. Because LLM latency and costs scale quadratically with context length, processing 20k "sculpted" tokens is significantly faster and more cost-effective than processing 85k raw tokens, even when accounting for the overhead of tool execution.

Discussion and Conclusion

The success of Sculptor suggests that context control is more vital than context size for achieving robustness at scale. By providing models with the tools to manage their own working memory, we enable a form of emergent agency. While the framework shows the greatest gains in filtering noise, its non-destructive nature (via fold and restore) ensures that the model can recover from errors in judgment.

Future work will explore applying Sculptor to non-long-context domains, such as mathematical reasoning or code generation, where the ability to "erase" and restart from a clean state could prevent the cascading errors common in complex chain-of-thought tasks.

Summary updated

BibTeX
@inproceedings{2026sculptor,
  author = {Ting Cao 曹婷 and Mo Li and L. H. Xu and Qitai Tan and Ting Cao and Yunxin Liu},
  title = {{Sculptor: Empowering LLMs with Cognitive Agency via Active Context Management}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=HPeiH7da0Z},
}
Figure