AI
New Benchmark Reveals LLMs Stumble When Refining Code in Multi-Turn Conversations
A fresh evaluation framework shows that large language models drop functional correctness by up to 69% when developers ask them to iteratively improve code across multiple exchanges.
Developers routinely ask AI models to refine code through iterative rounds of feedback—requesting style improvements, structural changes, or algorithmic tweaks. Yet most existing benchmarks only measure how well language models generate code from a single prompt, not whether refined versions still work correctly. A new research paper from arXiv exposes a significant gap: large language models struggle to maintain functional correctness across multi-turn refinement conversations.
The Problem: Missing Real-World Evaluation#
CodeChat-Eval addresses an understudied challenge in AI-driven software development. While LLMs have become routine code-generation tools, the typical workflow involves more than one exchange. A developer might ask an AI to "improve the efficiency" or "add error handling" after receiving initial output. Current evaluation methods don't capture this dynamic, making it impossible to know whether refined code still passes the original test suite.
Key Findings#
Researchers conducted empirical tests on both open-weight and proprietary models, observing dramatic correctness drops during refinement:
- GPT-5 Nano: 19.2% decrease in functional correctness
- Llama 3.1 8B: 69.2% decrease in functional correctness
- Other models fell somewhere between these extremes
The largest performance degradations occurred when refinement requests involved logic-level changes or additive modifications—tasks that require models to hold both the original intent and new constraints in mind simultaneously.
Why This Matters#
The findings underscore that LLMs can inadvertently introduce bugs when iterating on code, even if earlier generations appeared correct. This has practical implications for developers relying on AI assistants in real workflows, where refinement requests are standard practice. The research highlights the need for future benchmarks that measure whether models can successfully evolve code while preserving its core functionality.

