小模型智能体用聚类自组织记忆,减少干扰提升推理准确率
CLAG: Adaptive Memory Organization via Agent-Driven Clustering for Small Language Model Agents

- 小模型通过聚类将记忆分组,每组自动生成主题摘要和标签
- 在多个问答数据集上,答案准确率显著优于传统记忆系统
- 适合资源受限场景下的智能体,轻量高效且抗无关信息干扰
大语言模型智能体依赖外部记忆实现知识复用与复杂推理,但现有系统多采用单一全局存储池,易导致知识稀释或污染。这一问题在小型语言模型(SLMs)中尤为严重,因其对无关上下文极为敏感。本文提出基于聚类的智能体记忆框架CLAG,让SLM主动对记忆进行分组管理。CLAG使用SLM驱动的路由机制,将新记忆分配至语义一致的聚类,并自主生成每组的主题摘要与描述标签,使每个聚类成为独立功能单元。通过在结构化局部区域内演化,有效降低跨主题干扰,提升内部记忆密度。检索时采用两阶段流程:先通过聚类概要筛选相关组别,排除干扰项并缩小搜索空间。在三个SLM主干模型上,多个问答数据集实验表明,CLAG持续提升回答质量与鲁棒性,保持轻量高效。
原文摘要 · Abstract (English)
Large language model agents heavily rely on external memory to support knowledge reuse and complex reasoning tasks. Yet most memory systems store experiences in a single global retrieval pool which can gradually dilute or corrupt stored knowledge. This problem is especially pronounced for small language models (SLMs), which are highly vulnerable to irrelevant context. We introduce CLAG, a CLustering-based AGentic memory framework where an SLM agent actively organizes memory by clustering. CLAG employs an SLM-driven router to assign incoming memories to semantically coherent clusters and autonomously generates cluster-specific profiles, including topic summaries and descriptive tags, to establish each cluster as a self-contained functional unit. By performing localized evolution within these structured neighborhoods, CLAG effectively reduces cross-topic interference and enhances internal memory density. During retrieval, the framework utilizes a two-stage process that first filters relevant clusters via their profiles, thereby excluding distractors and reducing the search space. Experiments on multiple QA datasets with three SLM backbones show that CLAG consistently improves answer quality and robustness over prior memory systems for agents, remaining lightweight and efficient.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。