arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.19852cs.SEcs.AIcs.CL
收藏

ConvCodeWorld:在可复现反馈环境中基准化对话式代码生成

ConvCodeWorld: Benchmarking Conversational Code Generation in Reproducible Feedback Environments

Snowflake AI Research(Snowflake AI研究院);Seoul National University(首尔大学)

Hojae Han, Seung-won Hwang, Rajhans Samdani, Yuxiong He

AI总结:

提出ConvCodeWorld基准,模拟9种交互式代码生成场景并组合编译、执行和语言反馈,评估LLM性能,发现反馈质量显著影响结果,弱模型可借反馈超越强模型单轮表现。

摘要:

大型语言模型(LLMs)在代码生成方面已被证明极具价值,尤其是在交互式场景中。然而,现有的代码生成基准未能捕捉多轮交互中遇到的多样化反馈,限制了我们在这些情境下评估LLM的能力。为弥补这一空白,我们提出了一组新颖的基准,明确建模提供给代码生成LLM的反馈质量。我们的贡献有三方面:首先,我们引入了CONVCODEWORLD,一个新颖且可复现的交互式代码生成基准环境。CONVCODEWORLD模拟了9种不同的交互式代码生成场景,同时系统性地组合三种类型的反馈:(a)编译反馈;(b)具有不同测试覆盖率的执行反馈;(c)由GPT-4o生成的具有不同专业水平的语言反馈。其次,我们引入了CONVCODEBENCH,一个快速、静态的基准版本,使用预生成的反馈日志,消除了对昂贵的动态语言反馈生成的需求,同时与CONVCODEWORLD保持了强Spearman秩相关性(0.82至0.99)。第三,对包括R1-Distill在内的闭源和开源LLM在CONVCODEWORLD上的广泛评估揭示了关键见解:(a)LLM的性能根据提供的反馈而有显著差异;(b)较弱的LLM在足够反馈下,可以超越无反馈的最先进LLM的单轮结果;(c)在特定反馈组合上训练可能限制LLM利用未见组合的能力;(d)LLM在更少轮次中解决问题(高MRR)可能无法在总体上解决更多问题(高召回率),反之亦然。所有实现和基准将公开提供,网址为https://huggingface.co/spaces/ConvCodeWorld/ConvCodeWorld

英文摘要:

Large language models (LLMs) have proven invaluable for code generation, particularly in interactive settings. However, existing code generation benchmarks fail to capture the diverse feedback encountered in multi-turn interactions, limiting our ability to evaluate LLMs in these contexts. To address this gap, we present a set of novel benchmarks that explicitly model the quality of feedback provided to code generation LLMs. Our contributions are threefold: First, we introduce CONVCODEWORLD, a novel and reproducible environment for benchmarking interactive code generation. CONVCODEWORLD simulates 9 distinct interactive code generation scenarios while systematically combining three types of feedback: (a) compilation feedback; (b) execution feedback with varying test coverage; (c) verbal feedback generated by GPT-4o with different levels of expertise. Second, we introduce CONVCODEBENCH, a fast, static version of benchmark that uses pre-generated feedback logs, eliminating the need for costly dynamic verbal feedback generation while maintaining strong Spearman's rank correlations (0.82 to 0.99) with CONVCODEWORLD. Third, extensive evaluations of both closed-source and open-source LLMs including R1-Distill on CONVCODEWORLD reveal key insights: (a) LLM performance varies significantly based on the feedback provided; (b) Weaker LLMs, with sufficient feedback, can outperform single-turn results of state-of-the-art LLMs without feedback; (c) Training on a specific feedback combination can limit an LLM's ability to utilize unseen combinations; (d) LLMs solve problems in fewer turns (high MRR) may not solve as many problems overall (high Recall), and vice versa. All implementations and benchmarks will be made publicly available at https://huggingface.co/spaces/ConvCodeWorld/ConvCodeWorld

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

↑