arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.01560cs.CLcs.AI
收藏

In-N-Out: 一个用于工具代理的参数级API图数据集

In-N-Out: A Parameter-Level API Graph Dataset for Tool Agents

Department of Industrial Engineering, Seoul National University(首尔国立大学工业工程系);Graduate School of Data Science, Seoul National University(首尔国立大学数据科学研究生院)

Seungkyu Lee, Nalim Kim, Yohan Jo

AI总结:

In-N-Out通过构建参数级API图数据集,提升工具代理在复杂任务中识别和调用API的能力,显著改善了多工具查询生成性能。

摘要:

工具代理--基于大语言模型的系统,能够与外部API交互--提供了一种执行现实任务的方法。然而,随着任务变得越来越复杂,这些代理在识别和调用正确的API并按正确顺序调用时遇到困难。为了解决这个问题,我们研究将API文档转换为结构化的API图,以捕捉API依赖关系,并利用它进行需要组合性API调用的多工具查询。为了支持这一点,我们引入了In-N-Out,这是第一个由专家标注的API图数据集,基于两个现实世界API基准及其文档构建。使用In-N-Out显著提高了工具检索和多工具查询生成的性能,几乎使基于文档的LLM的性能翻倍。此外,由在In-N-Out上微调的模型生成的图关闭了90%的差距,表明我们的数据集帮助模型学会理解API文档和参数关系。我们的发现突显了使用显式API图用于工具代理的前景,并突显了In-N-Out作为有价值资源的实用性。我们发布了我们的数据集和代码在https://github.com/holi-lab/In-N-Out-API-Graph。

英文摘要:

Tool agents--LLM-based systems that interact with external APIs--offer a way to execute real-world tasks. However, as tasks become increasingly complex, these agents struggle to identify and call the correct APIs in the proper order. To tackle this problem, we investigate converting API documentation into a structured API graph that captures API dependencies and leveraging it for multi-tool queries that require compositional API calls. To support this, we introduce In-N-Out, the first expert-annotated dataset of API graphs built from two real-world API benchmarks and their documentation. Using In-N-Out significantly improves performance on both tool retrieval and multi-tool query generation, nearly doubling that of LLMs using documentation alone. Moreover, graphs generated by models fine-tuned on In-N-Out close 90% of this gap, showing that our dataset helps models learn to comprehend API documentation and parameter relationships. Our findings highlight the promise of using explicit API graphs for tool agents and the utility of In-N-Out as a valuable resource. We release our dataset and code at https://github.com/holi-lab/In-N-Out-API-Graph.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑