Introduction
Most current code generation benchmarks, such as HumanEval or MBPP, evaluate Large Language Models (LLMs) in a "one-and-done" setting: the model receives a prompt and must produce perfect code on its first attempt. However, real-world software development is inherently conversational. Developers write code, encounter errors, read logs, and iteratively refine their work based on feedback.
While some interactive benchmarks exist, they often lack diversity in the types of feedback provided (e.g., only showing execution errors) or are prohibitively expensive due to human-in-the-loop requirements. To address this, researchers have introduced ConvCodeWorld, a new benchmarking framework that evaluates how LLMs handle iterative, multi-turn feedback. By simulating distinct interactive scenarios—ranging from raw compiler errors to expert human advice—this work demonstrates that with the right feedback, "weaker" models can actually outperform state-of-the-art models operating in single-turn settings.
Methodology: Two Complementary Frameworks
To create a reproducible, diverse, and cost-effective environment, the authors introduce two complementary evaluation frameworks:
- CONVCODEWORLD (Dynamic): A dynamic environment that simulates nine interactive scenarios by combining three distinct feedback types:
- Compilation ($f_c$): Syntax and type-checking errors.
- Execution ($f_e$): Runtime errors and test results, featuring either partial or full test coverage.
- Verbal ($f_v$): Natural language feedback simulated by GPT-4o, acting either as a "Novice" (repeating errors) or an "Expert" (providing specific guidance for refinement).
- CONVCODEBENCH (Static): A static, highly efficient version of the benchmark. Instead of calling an LLM in real-time to generate verbal feedback—which is slow and expensive—it uses pre-generated logs from a reference model. This allows for fast, batched evaluation while maintaining a strong Spearman rank correlation (0.82 to 0.99) with the dynamic environment.
Datasets and Evaluation
The benchmarks are built upon BigCodeBench-Full-Instruct, a challenging dataset comprising 1,140 programming problems. The authors evaluated 21 different models, spanning closed-source giants like GPT-4o and open-source contenders such as Llama-3.1, DeepSeek-Coder, and recent R1-Distill models.
Key Insights
Extensive evaluations revealed several critical insights into how LLMs process feedback:
- Feedback is the Great Equalizer: Weaker models, when provided with sufficient multi-turn feedback, can surpass the single-turn performance of state-of-the-art models. This suggests that coding capability relies heavily on iterative refinement, not just initial logic.
- The Generalization Gap: Models specifically fine-tuned on certain feedback types often struggle when presented with unseen feedback combinations, indicating they can "overfit" to a specific style of interaction.
- Efficiency vs. Capability (MRR vs. Recall): There is a notable trade-off in model behavior. Some models are "fast learners" (high Mean Reciprocal Rank), solving problems in very few turns but hitting a ceiling early. Others are "slow and steady," eventually reaching a solution (high Recall) but requiring more conversational turns to get there.
- Expert Feedback is Hard to Use: Smaller models often become overwhelmed or distracted when given complex, expert-level verbal feedback combined with execution logs, sometimes performing worse than they would with simpler, raw error logs.
Key Results
The static ConvCodeBench proved to be a highly reliable proxy for the dynamic ConvCodeWorld, drastically reducing evaluation costs while preserving model rankings.
When looking at model performance across different feedback combinations, GPT-4o generally leads in efficiency (MRR), while GPT-4 often maintains the highest overall problem coverage (Recall). Among open-source models, Llama-3.1-70B-Instruct demonstrated highly competitive performance, occasionally matching or beating GPT-4 variants in specific feedback scenarios.
Limitations and Future Work
While using GPT-4o to simulate human feedback is significantly cheaper than using actual human evaluators, it may still carry the biases or "hallucinations" inherent to the simulator model. Additionally, the static benchmark relies on logs from a specific reference model (CodeLlama-7B), which could theoretically influence the difficulty landscape for different target models. Future work will explore how to train models to be more "feedback-agnostic," enabling them to generalize across diverse developer styles and expertise levels.
Summary updated