论文

FRESH:用异构图记忆让小模型工具调用智能体从失败中学习

Learning from Failures: Heterogeneous Graph Memory for Small Language Model Tool-Using Agents

精选理由

小模型跑工具智能体老犯重复调用、提前写入这类错,这篇把失败经验做成异构图记忆来避免,τ-Bench 和 AppWorld 都验证有效,做本地部署的可以看看。

论文提出 FRESH,一个面向工具调用智能体的 Failure-aware Retrieval 框架,把历史成功与失败经验组织成异构图结构。它显式建模任务、动作、错误、修复和执行条件之间的依赖关系,让冻结的小语言模型复用可靠策略、避免重复失败。针对的是小模型在有状态长程环境中常见的问题:漏掉必要观察、过早写入、重复失败调用和违反前置条件。在 τ-Bench 和 AppWorld 上,配合多个开源模型,FRESH 相比无记忆智能体和代表性记忆基线都提升了任务成功率。

原文 · arXiv cs.LG

Learning from Failures: Heterogeneous Graph Memory for Small Language Model Tool-Using Agents

Small and medium-sized language models offer cost-effective executors for tool-using agents, making them attractive for local and large-scale deployment. However, in long-horizon and stateful environments, they often make structural errors such as missing required observations, performing premature writes, repeating failed calls, and violating action preconditions. These errors can lead to incorrect state updates, policy violations, and costly or irreversible consequences, making reliable tool execution a critical deployment challenge. Existing fine-tuning approaches require substantial data and computation, while flat memory may retrieve failed actions without preserving their causal context or safety conditions. In this paper, we propose FRESH, a Failure-aware Retrieval framework over Experience-Structured Heterogeneous graphs, which transforms historical successes and failures into structured external experience for tool-using agents. By explicitly modeling the dependencies among tasks, actions, errors, repairs, and execution conditions, FRESH helps frozen language models reuse reliable strategies, avoid recurring failures, and make safer decisions in stateful tool interactions. Experiments on $τ$-Bench and AppWorld with multiple open-source models show that FRESH consistently improves task success and tool-use reliability over no-memory agents and representative memory-based baselines.