arXiv:2606.08151cs.AI2026-06

让大模型智能挑选关键信息,提升决策准确率。

Decision-Aware Memory Cards: Counterfactual-Inspired Context Selection and Compression for Tool-Using LLM Agents

  • 根据对下一步动作的影响评估信息价值,而非仅看相似度。
  • 在代码任务中将准确率从58%提升至78%,显著改善检索效果。
  • 可适配不同模型,适合需要精准推理的工具调用类AI系统。

现代大型语言模型(LLM)代理不仅需要更长的上下文,更需在行动时刻获取与决策相关的关键证据。本文研究决策感知的上下文选择:不依赖语义相似度,而是依据候选信息(如文件、测试用例、日志、规则、记忆)对未来动作的预期影响进行排序。提出反事实启发式上下文层(CICL),构建实例上下文图,估算候选单元的决策导向效用,并将选中证据压缩为带类型的记忆卡片。该框架可适配云端LLM裁判、本地替代模型或轻量级排序器,实现跨模型可审计的筛选机制。在50个SWE-bench Verified文件检索实例上,使用Qwen3.6-Plus对BM25前50名候选进行重排序,使命中率@1从0.58提升至0.78,归一化平均排名@10从0.634升至0.790,所有2,500项判断均能解析。受控诊断显示,移除最高效用语义单元后F1值从0.245降至0.000。在选中后压缩模式下,每查询节省44.93个词元,同时保留关键证据。CICL为工具型代理提供了可测量、可排序、可压缩决策关键上下文的实用层。代码已开源。

原文摘要 · Abstract (English)

Modern large language model (LLM) agents do not simply need longer contexts; they need decision-relevant evidence at the moment of action. We study decision-aware context selection: ranking retrieved files, tests, traces, rules, and memories by their expected effect on an agent's next action rather than by semantic similarity alone. We present the Counterfactual-Inspired Context Layer (CICL), which builds an instance context graph, estimates decision-oriented utility for candidate units, and compresses selected evidence into typed memory cards. The same schema can be instantiated with hosted LLM judges, local surrogates, or lightweight rankers, making the selection protocol auditable across model choices. On 50 SWE-bench Verified file-retrieval instances, Qwen3.6-Plus reranking of BM25 top-50 candidates improves hit@1 from 0.58 to 0.78 and MRR@10 from 0.634 to 0.790, with all 2,500 judgments parseable. Controlled diagnostics show that CICL identifies action-critical evidence: removing the top-utility semantic unit reduces F1 from 0.245 to 0.000. In selected-then-compressed mode, memory cards save 44.93 tokens per query while preserving selected evidence. CICL provides a practical layer for measuring, ranking, and compressing decision-critical context for tool-using agents. Code is available at https://github.com/stephen-guan-researcher/CICL.

大模型上下文选择决策优化记忆压缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。