用检索系统帮智能体从3.6万技能中精准挑出可用代码,提升编程能力。
SkillFlow: Scalable and Efficient Agent Skill Retrieval System
- 分四阶段检索:先粗筛再精排,逐步缩小候选技能范围。
- 在87个任务上将通过率从9.2%提升至16.4%,接近理想上限的84.1%。
- 适合想提升智能体代码复用能力的研究者和开发者。
AI智能体可在推理时加载可复用技能以扩展能力,但过多或无关技能会降低性能。随着社区贡献的技能库增长,智能体需能从大规模库中筛选最相关的技能。我们提出SkillFlow,首个面向智能体技能发现的多阶段检索管道,将技能获取视为对约3.6万条来自GitHub的SKILL.md定义构成语料库的信息检索问题。该管道通过四个阶段逐步缩小候选集:稠密检索、两轮交叉编码器重排序,以及大模型选择,每阶段平衡召回率与准确率。我们在两个编程基准上评估:SkillsBench(87个任务,229个匹配技能)和Terminal-Bench(89个任务,无匹配技能)。在SkillsBench上,使用SkillFlow检索的技能使Pass@1从9.2%提升至16.4%(+78.3%,$p_{\text{adj}} = 3.64 \times 10^{-2}$),达到84.1%的理论最优水平;而在Terminal-Bench上,智能体虽有70.1%的使用率,但未见性能提升,表明仅靠检索不足以提升表现,当语料库缺乏高质量、可执行技能时尤为明显。结果表明,将技能获取建模为信息检索是有效策略,而技能增强型智能体的实际效能取决于语料覆盖度和技能质量,尤其是可运行代码及配套资源的密度。
原文摘要 · Abstract (English)
AI agents can extend their capabilities at inference time by loading reusable skills into context, yet equipping an agent with too many skills, particularly irrelevant ones, degrades performance. As community-driven skill repositories grow, agents need a way to selectively retrieve only the most relevant skills from a large library. We present SkillFlow, the first multi-stage retrieval pipeline designed for agent skill discovery, framing skill acquisition as an information retrieval problem over a corpus of ~36K community-contributed SKILL.md definitions indexed from GitHub. The pipeline progressively narrows a large candidate set through four stages: dense retrieval, two rounds of cross-encoder reranking, and LLM-based selection, balancing recall and precision at each stage. We evaluate SkillFlow on two coding benchmarks: SkillsBench, a benchmark of 87 tasks and 229 matched skills; and Terminal-Bench, a benchmark that provides only 89 tasks, and no matched skills. On SkillsBench, SkillFlow-retrieved skills raise Pass@1 from 9.2% to 16.4% (+78.3%, $p_{\text{adj}} = 3.64 \times 10^{-2}$), reaching 84.1% of the oracle ceiling, while on Terminal-Bench, agents readily use the retrieved skills (70.1% use rate) yet show no performance gain, revealing that retrieval alone is insufficient when the corpus lacks high-quality, executable skills for the target domain. SkillFlow demonstrates that framing skill acquisition as an information retrieval task is an effective strategy, and that the practical impact of skill-augmented agents hinges on corpus coverage and skill quality, particularly the density of runnable code and bundled artifacts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。