CodeCriticBench: A Holistic Code Critique Benchmark for Large Language Models
提出了一种全面的代码批判基准CodeCriticBench,用于评估大型语言模型(LLMs)在代码生成和代码问答任务上的批判能力。
更新于 2025-04-21。作者:Alexander Zhang、Marcus Dong、Jiaheng Liu、Wei Zhang、Yejie Wang、Jian Yang、Ge Zhang、Tianyu Liu、Zhongyuan Peng、Yingshui Tan、Yuanxing Zhang、Zhexu Wang、Weixun Wang、Yancheng He、Ken Deng、Wangchunshu Zhou、Wenhao Huang、Zhaoxiang Zhang。
中文摘要
大型语言模型(LLMs)的批判能力对于推理能力至关重要,这可以提供必要的建议(例如,详细分析和建设性反馈)。因此,如何评估LLMs的批判能力引起了广泛关注,并提出了几个批判基准。然而,现有的批判基准通常存在以下局限性:(1)主要关注通用领域中的多样化推理任务,对代码任务的评估不足(例如,仅涵盖代码生成任务),其中查询的难度相对较低(例如,CriticBench的代码查询来自Humaneval和MBPP)。(2)缺乏从不同维度的全面评估。为了解决这些局限性,我们引入了一个针对LLMs的全面代码批判基准,称为CodeCriticBench。具体来说,我们的CodeCriticBench包括两个主流代码任务(即代码生成和代码问答)以及不同难度的任务。此外,评估协议包括针对不同特性的基本批判评估和高级批判评估,其中为高级设置精心设计了细粒度的评估清单。最后,我们进行了现有LLMs的广泛实验结果,这显示了CodeCriticBench的有效性。
英文摘要
The critique capacity of Large Language Models (LLMs) is essential for reasoning abilities, which can provide necessary suggestions (e.g., detailed analysis and constructive feedback). Therefore, how to evaluate the critique capacity of LLMs has drawn great attention and several critique benchmarks have been proposed. However, existing critique benchmarks usually have the following limitations: (1). Focusing on diverse reasoning tasks in general domains and insufficient evaluation on code tasks (e.g., only covering code generation task), where the difficulty of queries is relatively easy (e.g., the code queries of CriticBench are from Humaneval and MBPP). (2). Lacking comprehensive evaluation from different dimensions. To address these limitations, we introduce a holistic code critique benchmark for LLMs called CodeCriticBench. Specifically, our CodeCriticBench includes two mainstream code tasks (i.e., code generation and code QA) with different difficulties. Besides, the evaluation protocols include basic critique evaluation and advanced critique evaluation for different characteristics, where fine-grained evaluation checklists are well-designed for advanced settings. Finally, we conduct extensive experimental results of existing LLMs, which show the effectiveness of CodeCriticBench.
解读
一句话总结
提出了一种全面的代码批判基准CodeCriticBench,用于评估大型语言模型(LLMs)在代码生成和代码问答任务上的批判能力。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:现有代码批判基准在评估代码任务方面存在局限性,例如仅涵盖代码生成任务,且查询难度相对较低;缺乏从不同维度的全面评估。
- 现有方案不足:现有代码批判基准主要关注通用领域的多样化推理任务,对代码相关任务的评估不足;缺乏全面的多维度评估。
- 研究目标:提出CodeCriticBench,一个全面的代码批判基准,包括代码生成和代码问答任务,以及基本和高级批判评估。
问题2:论文的核心创新点是什么?
- 技术创新:提出CodeCriticBench,一个全面的代码批判基准,包含代码生成和代码问答任务,以及基本和高级批判评估。
- 方法改进:设计基本和高级批判评估,提供全面的分析,包括基本设置中的“正确/错误”响应和高级设置中的细粒度评估清单。
- 优势:与现有方法相比,CodeCriticBench提供了更全面和细致的评估,能够更准确地衡量和比较不同模型在代码批判性能上的差异。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:对38个LLMs(包括通用和代码特定模型)在CodeCriticBench上进行系统性评估。
- 性能提升:实验结果表明,随着模型参数的增加,性能有所提升,LLMs在代码生成和代码问答任务上的表现有所提高。
- 对比结果:与基线方法相比,CodeCriticBench提供了更全面和细致的评估,能够更准确地衡量和比较不同模型在代码批判性能上的差异。
问题4:这个研究的实际应用价值是什么?
- 应用场景:CodeCriticBench可以用于评估和比较不同LLMs在代码生成和代码问答任务上的批判能力,为LLMs在编码辅助工具和自动代码审查系统中的应用提供支持。
- 实施建议:在实际部署中,可以使用CodeCriticBench来评估和改进LLMs的代码批判能力,以提高其输出质量和可靠性。
- 局限与展望:CodeCriticBench目前仅限于单文件场景,未来可以扩展到仓库级别的批判,并扩展其范围以包括其他领域。
来源
机器可读索引:llms.txt