基于生成模型的代码审查相关性的评估
On Assessing the Relevance of Code Reviews Authored by Generative Models
AI总结:
本文提出多主观排名方法,评估生成模型在代码审查中的表现,发现其生成评论质量优于人类,但需警惕潜在风险。
摘要:
在代码审查中使用大型语言模型如ChatGPT提供了显著的效率提升,但也引发了关于正确性和安全性的担忧。现有的代码审查生成评估方法要么依赖于与单一地面真实值的自动比较,这无法捕捉人类观点的多样性,要么依赖于对“有用性”的主观评估,这是一个高度模糊的概念。我们提出了一种基于我们称之为多主观排名的新型评估方法。使用包含280个自包含代码审查请求及其相应评论的CodeReview StackExchange数据集,多个人类评委对ChatGPT生成的评论质量进行了排名,同时对比了平台上的顶级人类响应。结果显示,ChatGPT的评论在人类评论之上被显著排名,甚至超过了StackExchange的接受答案。进一步来说,我们提出的方法促进了对生成AI在代码审查性能的更有意义的评估,同时也提高了对未受控整合到审查过程中的潜在风险的认识。
英文摘要:
The use of large language models like ChatGPT in code review offers promising efficiency gains but also raises concerns about correctness and safety. Existing evaluation methods for code review generation either rely on automatic comparisons to a single ground truth, which fails to capture the variability of human perspectives, or on subjective assessments of "usefulness", a highly ambiguous concept. We propose a novel evaluation approach based on what we call multi-subjective ranking. Using a dataset of 280 self-contained code review requests and corresponding comments from CodeReview StackExchange, multiple human judges ranked the quality of ChatGPT-generated comments alongside the top human responses from the platform. Results show that ChatGPT's comments were ranked significantly better than human ones, even surpassing StackExchange's accepted answers. Going further, our proposed method motivates and enables more meaningful assessments of generative AI's performance in code review, while also raising awareness of potential risks of unchecked integration into review processes.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。