[论文解读] LLM Agents Making Agent Tools
ToolMaker 自动将带代码的科学论文转化为 LLM 兼容工具,构建可重复执行的运行环境,在 TM-BENCH 基准测试上实现 80% 的任务准确率,显著高于 OpenHands。
Tool use has turned large language models (LLMs) into powerful agents that can perform complex multi-step tasks by dynamically utilising external software components. However, these tools must be implemented in advance by human developers, hindering the applicability of LLM agents in domains demanding large numbers of highly specialised tools, like in life sciences and medicine. Motivated by the growing trend of scientific studies accompanied by public code repositories, we propose ToolMaker, an agentic framework that autonomously transforms papers with code into LLM-compatible tools. Given a GitHub URL and short task description, ToolMaker autonomously installs dependencies and generates code to perform the task, using a closed-loop self-correction mechanism for debugging. To evaluate our approach, we introduce a benchmark comprising 15 complex computational tasks spanning various domains with over 100 unit tests to assess correctness and robustness. Our method correctly implements 80% of the tasks, substantially outperforming current state-of-the-art software engineering agents. ToolMaker therefore is a step towards fully autonomous agent-based scientific workflows. Our code and benchmark are publicly available at https://github.com/KatherLab/ToolMaker.
研究动机与目标
- 在大模型代理中减轻手工构建工具的负担,特别是在生命科学与医学领域的动机。
- 引入一种自治的工具创建框架,从论文和代码仓库派生工具。
- 实现端到端的工具实现,包括环境搭建、安装与测试。
- 提供一个现实多步科学任务与大量单元测试的基准 TM-BENCH,用于评估工具创建。
- 证明自治工具创建在此场景下可超越现有的软件工程代理的性能。
提出的方法
- 提出 TOOLMAKER,一个具备自主下载、集成和实现现有科学论文与 GitHub 仓库中工具的代理框架。
- 定义最小工具规范,包括任务描述、仓库 URL 与输入参数;TOOLMAKER 还构建一个可重复的基于 Docker 的执行环境。
- 将 TOOLMAKER 构建为两阶段工作流:环境搭建(创建 Docker 快照)和工具实现(生成 Python 函数)。
- 将工作流建模为 LLM 调用、环境动作与代理子任务之间的互动,通过错误诊断与重新实现实现闭环自我提升。
- 执行一个闭环循环:初始工具实现,通过单元测试进行测试,诊断故障,重新实现,并在成功前进行总结。
实验结果
研究问题
- RQ1LLM 代理能否自治下载、安装依赖并从科学论文与仓库组装可重复使用的工具?
- RQ2这种自治创建的工具是否在多样化的真实科学任务中具备鲁棒性能?
- RQ3在准确性、可靠性和成本方面,自治工具创建与现有软件工程代理相比如何?
- RQ4将与任务和论文相关的摘要纳入对工具创建效率的影响是什么?
- RQ5在生命科学工作流中,完全自动化工具创建的局限性和风险是什么?
主要发现
- TOOLMAKER 在 15 个基准任务中正确实现了 80%(12/15)。
- 与 OpenHands 基线相比,TOOLMAKER 在任务正确性方面显著优于对手(12/15 对比 3/15)。
- TOOLMAKER 能创建需要编排多函数与依赖的多步工具,包括 GPU 加速的工作流。
- 该框架使用一个闭环自我纠错机制,对计划、实现、测试和重新实现进行迭代以修复错误。
- 消融实验表明论文摘要能减少动作和迭代次数,而模型选择与提示设计会影响成本与性能。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。