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

AutoFeedback:一种用于高效精准生成API请求的基于大语言模型的框架

AutoFeedback: An LLM-based Framework for Efficient and Accurate API Request Generation

College of Computing(计算机学院);National University of Defense Technology(国防科技大学)

Huanxi Liu, Jiaqi Liao, Dawei Feng, Kele Xu, Huaimin Wang

AI总结:

针对大语言模型生成API请求时因幻觉存在准确率低、现有反馈方法事实性与细节不足的问题,提出含静态扫描、动态分析双组件的AutoFeedback框架,通过双反馈循环提升生成准确率并降低交互成本。

摘要:

大语言模型(LLM)主要通过生成API请求来调用外部工具,以提升任务完成效率。API请求生成的准确性在很大程度上决定了LLM完成任务的能力。由于LLM本身存在幻觉问题,很难高效且准确地生成正确的API请求。当前研究采用基于提示词的反馈来辅助基于LLM的API请求生成,但现有方法缺乏事实信息且细节不足。为解决这些问题,我们提出AutoFeedback——一种用于高效精准生成API请求的基于LLM的框架,包含静态扫描组件(SSC)和动态分析组件(DAC)。SSC将API请求中检测到的错误作为伪事实纳入反馈,丰富了事实信息;DAC从API文档中检索信息,提升了反馈的细节程度。基于这两个组件,AutoFeedback在LLM生成API请求的过程中实现了两个反馈循环。大量实验表明,该框架显著提升了API请求生成的准确率并降低了交互成本。AutoFeedback在一个真实世界API数据集上达到100.00%的准确率,同时将与GPT-3.5 Turbo的交互成本降低23.44%,与GPT-4 Turbo的交互成本降低11.85%。

英文摘要:

Large Language Models (LLMs) leverage external tools primarily through generating the API request to enhance task completion efficiency. The accuracy of API request generation significantly determines the capability of LLMs to accomplish tasks. Due to the inherent hallucinations within the LLM, it is difficult to efficiently and accurately generate the correct API request. Current research uses prompt-based feedback to facilitate the LLM-based API request generation. However, existing methods lack factual information and are insufficiently detailed. To address these issues, we propose AutoFeedback, an LLM-based framework for efficient and accurate API request generation, with a Static Scanning Component (SSC) and a Dynamic Analysis Component (DAC). SSC incorporates errors detected in the API requests as pseudo-facts into the feedback, enriching the factual information. DAC retrieves information from API documentation, enhancing the level of detail in feedback. Based on this two components, Autofeedback implementes two feedback loops during the process of generating API requests by the LLM. Extensive experiments demonstrate that it significantly improves accuracy of API request generation and reduces the interaction cost. AutoFeedback achieves an accuracy of 100.00\% on a real-world API dataset and reduces the cost of interaction with GPT-3.5 Turbo by 23.44\%, and GPT-4 Turbo by 11.85\%.

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

↑