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

高级系统集成:分析用于检索增强生成的 OpenAPI 分块

Advanced System Integration: Analyzing OpenAPI Chunking for Retrieval-Augmented Generation

University of Stuttgart(斯图加特大学);Sapienza Università di Roma(罗马大学)

Robin D. Pesl, Jerin G. Mathew, Massimo Mecella, Marco Aiello

AI总结:

本文研究 OpenAPI 描述的分块预处理与 RAG 端点发现,并提出按需检索细节的 Discovery Agent,实验表明其可减少 token 并提升精确率与 F1。

摘要:

集成多个(子)系统对于创建高级信息系统(IS)至关重要。困难主要出现在整个 IS 生命周期中集成动态环境时。传统方法是使用注册表,该注册表提供系统端点的 API 文档。大型语言模型(LLM)已被证明能够基于此类文档自动创建系统集成(例如作为服务组合),但由于输入 token 限制,尤其是在全面的 API 描述方面,它们需要简洁的输入。目前,尚不清楚如何最好地预处理这些 API 描述。在本工作中,我们(i)分析了检索增强生成(RAG)在端点发现中的使用,以及 OpenAPI 的分块(即预处理),以在保留最相关信息的同时减少输入 token 长度。为了进一步减少组合提示的输入 token 长度并改进端点检索,我们提出(ii)一个 Discovery Agent,它只接收最相关端点的摘要,并按需检索详细信息。我们使用 RestBench 基准评估用于端点发现的 RAG:首先针对不同的分块可能性和参数,测量端点检索的召回率、精确率和 F1 分数;随后,我们使用相同的测试集评估 Discovery Agent。通过我们的原型,我们展示了如何成功采用 RAG 进行端点发现以减少 token 数量。尽管召回率、精确率和 F1 均呈现较高数值,但仍需进一步研究以检索所有必要端点。我们的实验表明,在预处理方面,基于 LLM 和针对特定格式的方法优于朴素分块方法。依赖智能体进一步增强了这些结果,因为该智能体将任务拆分为多个细粒度子任务,从而在 token 数量、精确率和 F1 分数方面提升了整体 RAG 性能。

英文摘要:

Integrating multiple (sub-)systems is essential to create advanced Information Systems (ISs). Difficulties mainly arise when integrating dynamic environments across the IS lifecycle. A traditional approach is a registry that provides the API documentation of the systems' endpoints. Large Language Models (LLMs) have shown to be capable of automatically creating system integrations (e.g., as service composition) based on this documentation but require concise input due to input token limitations, especially regarding comprehensive API descriptions. Currently, it is unknown how best to preprocess these API descriptions. Within this work, we (i) analyze the usage of Retrieval Augmented Generation (RAG) for endpoint discovery and the chunking, i.e., preprocessing, of OpenAPIs to reduce the input token length while preserving the most relevant information. To further reduce the input token length for the composition prompt and improve endpoint retrieval, we propose (ii) a Discovery Agent that only receives a summary of the most relevant endpoints and retrieves details on demand. We evaluate RAG for endpoint discovery using the RestBench benchmark, first, for the different chunking possibilities and parameters measuring the endpoint retrieval recall, precision, and F1 score. Then, we assess the Discovery Agent using the same test set. With our prototype, we demonstrate how to successfully employ RAG for endpoint discovery to reduce the token count. While revealing high values for recall, precision, and F1, further research is necessary to retrieve all requisite endpoints. Our experiments show that for preprocessing, LLM-based and format-specific approaches outperform naïve chunking methods. Relying on an agent further enhances these results as the agent splits the tasks into multiple fine granular subtasks, improving the overall RAG performance in the token count, precision, and F1 score.

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

↑