本文提出开源流水线 ToolFactory,通过利用 LLM 理解非结构化 REST API 文档自动生成 AI 兼容工具,结合错误诊断与知识库推断缺失信息,有效促进了科学 API 在 AI 工作流中的无缝集成。
摘要:
基于 LLM 的工具智能体提供自然语言接口,使用户能够无缝地与计算服务进行交互。虽然 REST API 是构建此类智能体的宝贵资源,但它们必须首先被转换为 AI 兼容的工具。从 REST API 文档自动生成 AI 兼容的工具可以极大地简化工具智能体的开发并减少用户的学习成本。然而,API 文档通常缺乏标准化、模式不一致且信息不完整。为了解决这些问题,我们开发了 ToolFactory,这是一个用于从非结构化 API 文档中自动生成工具的开源流水线。为了提高所开发工具的可靠性,我们实现了一种评估方法来诊断错误。此外,我们构建了一个经过验证的工具知识库,并利用它来推断文档记录不全的 API 中缺失的信息。我们开发了 API Extraction Benchmark,包含 167 个 API 文档和 744 个各种格式的端点,并设计了一个 JSON 模式来对它们进行标注。这个标注数据集被用于训练和验证 ToolFactory。实验结果突出了 ToolFactory 的有效性。我们还通过为糖材料研究创建一个特定领域的 AI 智能体来演示了 ToolFactory。ToolFactory 展示出在促进科学 REST API 无缝集成到 AI 工作流方面的巨大潜力。
英文摘要:
LLM-based tool agents offer natural language interfaces, enabling users to seamlessly interact with computing services. While REST APIs are valuable resources for building such agents, they must first be transformed into AI-compatible tools. Automatically generating AI-compatible tools from REST API documents can greatly streamline tool agent development and minimize user learning curves. However, API documentation often suffers from a lack of standardization, inconsistent schemas, and incomplete information. To address these issues, we developed \textbf{ToolFactory}, an open-source pipeline for automating tool generation from unstructured API documents. To enhance the reliability of the developed tools, we implemented an evaluation method to diagnose errors. Furthermore, we built a knowledge base of verified tools, which we leveraged to infer missing information from poorly documented APIs. We developed the API Extraction Benchmark, comprising 167 API documents and 744 endpoints in various formats, and designed a JSON schema to annotate them. This annotated dataset was utilized to train and validate ToolFactory. The experimental results highlight the effectiveness of ToolFactory. We also demonstrated ToolFactory by creating a domain-specific AI agent for glycomaterials research. ToolFactory exhibits significant potential for facilitating the seamless integration of scientific REST APIs into AI workflows.
Evaluating the Use of LLMs for Documentation to Code Traceability
Data-driven Analysis of Software (DAS) Lab Department of Computer Science \& Software Engineering Concordia University Montréal QC Canada;Concordia University
Can LLMs Help Create Grammar?: Automating Grammar Creation for Endangered Languages with In-Context Learning
Language and Information Technology Programme, Faculty of Arts, CU(朱拉隆功大学文学院语言与信息技术项目);Center for Information and Language Processing (CIS), LMU Munich(慕尼黑大学信息与语言处理中心)
GPT-4.1 Sets the Standard in Automated Experiment Design Using Novel Python Libraries
Copelabs, Lusófona University(Copelabs与卢斯奥法纳大学);Center of Technology and Systems (UNINOVA-CTS) and Associated Lab of Intelligent Systems (LASI)(技术与系统中心(UNINOVA-CTS)及智能系统关联实验室);CICANT, Lusófona University(CICANT与卢斯奥法纳大学)
Investigating the Potential of Large Language Model-Based Router Multi-Agent Architectures for Foundation Design Automation: A Task Classification and Expert Selection Study
King Mongkut's University of Technology Thonburi(国王科技大学)
Model selection meets clinical semantics: Optimizing ICD-10-CM prediction via LLM-as-Judge evaluation, redundancy-aware sampling, and section-aware fine-tuning
National Kaohsiung University of Science and Technology(高雄科技大学);National Health Research Institutes(国家卫生研究院);Kaohsiung Medical University(高雄医学大学);Taitung MacKay Memorial Hospital(台东马偕纪念医院);MacKay Medical University(马偕医科大学);Kaohsiung Medical University Hospital(高雄医学大学附设医院)