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

Bug In the Code Stack:大语言模型能否在大型Python代码栈中找到Bug

Bug In the Code Stack: Can LLMs Find Bugs in Large Python Code Stacks

University of Waterloo(滑铁卢大学)

Hokyung Lee, Sumanyu Sharma, Bing Hu

AI总结:

本研究提出评估LLM在大型Python代码栈中识别简单语法Bug能力的BICS基准,发现代码环境检索难度高于文本环境,不同模型性能差异大,且上下文越长性能普遍越差。

摘要:

针对大海捞针(Needle-in-a-Haystack, NIAH)基准的近期研究已探索了大语言模型(Large Language Models, LLMs)从大型文本文档中检索上下文信息的能力。然而,随着LLM越来越多地融入软件开发流程,评估其在基于代码的环境中的表现至关重要。随着LLM在程序合成方向的进一步发展,我们需要确保LLM能够理解语法并写出语法正确的代码。作为确保LLM理解语法的一项举措,可通过查找和检测语法错误的能力来评估LLM。我们提出的基准Bug In The Code Stack(BICS)旨在评估LLM在大型源代码中识别简单语法错误的能力。我们的发现揭示了三个关键洞见:(1)对于检索任务,基于代码的环境比基于文本的环境带来的挑战显著更大;(2)不同模型之间存在 substantial 的性能差距;(3)更长的上下文长度与性能下降之间存在显著相关性,不过这种下降的程度因模型而异。

英文摘要:

Recent research in Needle-in-a-Haystack (NIAH) benchmarks has explored the capabilities of Large Language Models (LLMs) in retrieving contextual information from large text documents. However, as LLMs become increasingly integrated into software development processes, it is crucial to evaluate their performance in code-based environments. As LLMs are further developed for program synthesis, we need to ensure that LLMs can understand syntax and write syntactically correct code. As a step in ensuring LLMs understand syntax, LLMs can be evaluated in their ability to find and detect syntax bugs. Our benchmark, Bug In The Code Stack (BICS), is designed to assess the ability of LLMs to identify simple syntax bugs within large source code. Our findings reveal three key insights: (1) code-based environments pose significantly more challenge compared to text-based environments for retrieval tasks, (2) there is a substantial performance disparity among different models, and (3) there is a notable correlation between longer context lengths and performance degradation, though the extent of this degradation varies between models.

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

↑