arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.15232cs.SE
收藏

当代理失效:对LLM代理中bug的全面研究与自动化标记

When Agents Fail: A Comprehensive Study of Bugs in LLM Agents with Automated Labeling

Oakland University(奥克兰大学);Texas State University(德克萨斯州立大学);Tulane University(杜兰大学)

Niful Islam, Ragib Shahriar Ayon, Deepak George Thomas, Shibbir Ahmed, Mohammad Wardat

AI总结:

本文通过分析1187个bug相关帖子和代码片段,研究LLM代理中的bug类型、根本原因及影响,并构建BugReAct代理自动标记bug。

摘要:

大型语言模型(LLMs)已革新了智能应用开发。尽管独立LLMs无法执行任何操作,但LLM代理通过整合工具克服了这一限制。然而,调试LLM代理困难且成本高,因为该领域仍处于早期阶段且社区不成熟。为了理解代理开发中遇到的bug,我们进行了首次全面研究,探讨LLM代理软件中bug的类型、根本原因和影响。我们从Stack Overflow、GitHub和Hugging Face论坛收集并分析了1,187个bug相关的帖子和代码片段,重点研究了使用七个广泛使用的LLM框架以及自定义实现构建的LLM代理。为了深入分析,我们还研究了bug发生的位置、编程语言和框架。本研究还探讨了自动化bug识别的可行性。为此,我们构建了一个名为BugReAct的ReAct代理,配备了足够的外部工具,以确定它是否能检测并标注我们的数据集中的bug。根据我们的研究,我们发现,配备Gemini 2.5 Flash的BugReAct在标注bug特征方面表现优异,平均成本为每篇帖子/代码片段0.01美元。

英文摘要:

Large Language Models (LLMs) have revolutionized intelligent application development. While standalone LLMs cannot perform any actions, LLM agents address the limitation by integrating tools. However, debugging LLM agents is difficult and costly, as the field is still in its early stages and the community is underdeveloped. To understand the bugs encountered during agent development, we present the first comprehensive study of bug types, root causes, and effects in LLM agent-based software. We collected and analyzed 1,268 bug-related posts and code snippets from Stack Overflow, GitHub, and Hugging Face forums, focused on LLM agents built with seven widely used LLM frameworks as well as custom implementations. For a deeper analysis, we have also studied the component of the LLM agent where the bug occurred, along with the programming language and framework. This study also investigates the feasibility of automating bug identification. For that, we have built a ReAct agent named BugReAct, equipped with adequate external tools to determine whether it can detect and annotate the bugs in our dataset. According to our study, we found that BugReAct equipped with Gemini 2.5 Flash achieved a remarkable performance in annotating bug characteristics with an average cost of 0.01 USD per post/code snippet.

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

↑