NeFut Logo NeFut
Admin Login

[CS.AI] Memory Selection in Language Agents: Budget-Dependent Strategies

Published at: 2026-07-22 22:00 Last updated: 2026-07-23 12:33
#AI #Machine Learning #optimization

Language agents rely on memory across interactions, but the limited context windows of large language models (LLMs) and their inference costs constrain the amount of memory that can be used at once. Existing systems mainly follow two strategies: memory retention and memory consolidation. Retention keeps raw records and preserves exact details, but relevant evidence may not fit under a tight budget; consolidation compresses and combines records, improving coverage per token but risking the loss of query-critical details. This raises two central questions: when should consolidation replace retention, and which operator – Merge, Abstract, or Rewrite – should be selected?

We formalize this decision by decomposing each operator's utility into a coverage effect on evidence omitted by retention and a signed replacement effect on raw evidence that already fits. Their balance explains why the preferred action changes with relative budget pressure. We implement this mechanism with Offline Abstraction-Safety (OAS), a lightweight learner that estimates action utilities from pre-generation features with held-out harm calibration.

The public LongMemEval and LoCoMo benchmarks show the same budget-dependent pattern. On LongMemEval, consolidation improves absolute accuracy by up to 48% under tight budgets, whereas retention is preferable under loose budgets; LoCoMo replicates this crossover at a smaller budget, consistent with its shorter evidence. On both datasets, cross-note abstraction and merging generally outperform local rewriting when compression is necessary.

Blogger's Review: The proposed memory selection strategy offers a novel approach to optimizing performance in language agents, especially under budget constraints. By analyzing the utility of retention versus consolidation, it demonstrates how to make more rational decisions under varying budget pressures, laying a foundation for future research. The key OAS method provides an effective implementation path for this strategy, warranting further exploration.

Original Source: https://arxiv.org/abs/2607.17545

[h] Back to Home