CaSKG:用于可扩展智能体技能检索的反事实因果技能图

·

研究论文 · 2026/08/28

可复用技能库使大语言模型代理能够跨任务重用程序性知识,但也使记忆访问成为具有挑战性的检索问题。我们提出CaSKG,一种反事实因果技能图框架,在检索前校准程序性关系。CaSKG首先从语义、词汇、输入/输出和结构证据构建高召回率的有向候选图,并通过修复证据和可选的LLM评判器进一步细化候选分数。然后应用方向条件的文本反事实探针,移除、替换和重新排序技能对,用贝叶斯平滑聚合证据,并发布状态过滤的加权图用于任务条件扩展。该图离线构建,无需改变下游代理策略或任务接口。在ALFWorld ID-140和ScienceWorld U211上,使用六个LLM骨干,CaSKG在所有十二种模型和基准组合中取得最高任务分数。与Graph-of-Skills相比,它将六模型宏平均ScienceWorld分数从72.62提高到80.50,ALFWorld成功率从80.01%提高到86.79%,同时减少了两个基准的平均环境步骤。定性和消融分析进一步表明,校准的边帮助检索保留前提条件、状态改变动作、验证例程和最终完成步骤。这些结果将边置信度校准定位为大规模紧凑可执行技能检索的有效途径。代码可在https://github.com/ZhiyuanLi218/Caskg获取。

该论文针对LLM代理技能检索中的关键问题,提出创新的反事实因果图方法,显著提升检索质量和效率,在多个基准上验证了有效性,具有实际应用价值。

Reusable skill libraries allow large language model (LLM) agents to reuse procedural knowledge across tasks, but they also turn memory access into a challenging retrieval problem. Full-library prompting preserves coverage at high context cost, vector retrieval returns compact neighborhoods but treats skills as independent text, and graph-based retrieval can recover workflow context only when the edges that carry relevance are reliable. We propose CaSKG, a counterfactual-causal skill graph framework that calibrates procedural relations before retrieval. CaSKG first builds a high-recall directed candidate graph from semantic, lexical, input/output, and structural evidence, with repair evidence and an optional LLM judge further refining candidate scores. It then applies direction-conditioned textual counterfactual probes that remove, substitute, and reorder skill pairs, aggregates the evidence with Bayesian smoothing, and publishes a state-filtered weighted graph for task-conditioned expansion. The graph is constructed offline and used without changing the downstream agent policy or task interface. Across six LLM backbones on ALFWorld ID-140 and ScienceWorld U211, CaSKG achieves the highest task score in all twelve combinations of model and benchmark. Relative to Graph-of-Skills (GoS), it improves the six-model macro-average ScienceWorld score from 72.62 to 80.50 and ALFWorld success from 80.01\% to 86.79\%, while reducing mean environment steps on both benchmarks. Qualitative and ablation analyses further show that calibrated edges help retrieval preserve prerequisites, state-changing actions, verification routines, and final completion steps. These results position edge-confidence calibration as an effective route to compact and executable skill retrieval at scaleCode is available at: https://github.com/ZhiyuanLi218/Caskg .

阅读原文

参与讨论