数据库增强的检索增强生成(RAG)用于REST API误用的自动修复
Database-Augmented RAG for Automated Repair of REST API Misuses
浏览论文内容
中文总结 AI 辅助
本研究构建11种不同数据库结构的RAG配置,对比基线方法,发现按版本和内容类型组织API规范的四数据库RAG方法,能将REST API误用修复率从54.3%提升至88.6%。
中文摘要 AI 辅助
许多物联网(IoT)服务提供表述性状态转移(REST)API,要求客户端开发者实现符合对应API规范的应用程序。当客户端程序存在API误用时,开发者会基于错误响应进行调试,但此类响应往往不足以定位根本原因,需要开发者反复与服务器交互。检索增强生成(RAG)是为大语言模型(LLM)提供外部知识的有前景方法,但在REST API误用的自动修复场景中,如何将规范存储到RAG数据库仍不明确。本研究评估了不同API规范组织配置对基于RAG的REST API误用修复的影响,构建了11种具有不同数据库结构的RAG配置,并将其修复率与基线方法进行比较。评估使用了从真实仓库收集的REST API误用案例,结果显示,在研究的数据集上,基线方法的修复率为54.3%,而使用四个数据库的基于RAG的方法达到了88.6%的最高修复率。这些结果表明,根据版本和内容类型组织规范,是基于RAG的REST API误用修复的有效设计选择。
英文摘要
Many Internet of Things (IoT) services provide Representational State Transfer (REST) APIs, which require client developers to implement applications that conform to the corresponding API specifications. When client programs contain API misuse, developers debug them based on error responses. However, such responses are often insufficient for identifying the root cause, requiring developers to repeatedly communicate with the server. Retrieval-Augmented Generation (RAG) is a promising approach for providing large language models (LLMs) with external knowledge. However, in automated repair of REST API misuses, it remains unclear how specifications should be stored in a RAG database. This study evaluates how different configurations for organizing API specifications affect RAG-based repair of REST API misuse. We constructed 11 RAG configurations with different database structures and compared their repair rates with a baseline method. For evaluation, we used REST API misuse cases collected from real-world repositories. The results show that, in the studied datasets, the baseline method achieved a repair rate of 54.3%, whereas a RAG-based method using four databases achieved a maximum repair rate of 88.6%. These results indicate that organizing specifications according to version and content type can be an effective design choice for RAG-based REST API misuse repair.
发表机构
- Ritsumeikan University(立命馆大学)
机构由 AI 辅助整理,请以论文原文为准。