这篇论文揭示了多轮编程时模型容易忘掉之前写对的东西,甚至四成以上任务会翻车。他们发现一个验证门控策略能显著改善,值得做AI编程工具的人看看。
研究发现,在对六个LLM模型(包括DeepSeek-V3、Llama-3.1-8B等)进行26,016次多轮编程测试中,40%至73%的任务在8轮对话中丢失了之前正确的行为。论文构建了542个基于HumanEval+和MBPP+的任务,并扩展为8轮需求演化链。手动分析384个失败案例后,确定了跨轮冲突是主要失效模式。Verification Gate策略(对先前测试进行新代码验证并回滚重试)能将DeepSeek-V3的最终轮质量从75.8%提升至87.9%,Llama-3.1-8B从31.6%提升至47.3%。
Regression Accumulation in Multi-Turn LLM Programming Conversations
In LLM-assisted software development, coding is often iterative. We study regression accumulation in multi-turn LLM programming conversations, where later code suggestions may break requirements introduced in earlier turns. Reliability therefore depends not only on satisfying the current request, but also on preserving previously satisfied behavior. We construct 542 tasks from HumanEval+ and MBPP+ and extend each task into an 8-turn requirement-evolution chain. We evaluate six LLMs on 26,016 turn instances (542 x 6 x 8). At each turn, we test whether the current code still passes earlier benchmark tests. We also analyze 384 failure cases from the failure population and build a taxonomy of multi-turn regression bugs through independent four-annotator labeling. Our results show that regression accumulation appears across all six models: 40% to 73% of tasks lose previously correct behavior over the full conversation. Final-turn quality is lower than initial-turn quality across models, especially when later turns add input validation or broader input types. Manual analysis shows that Cross-Turn Conflict, where later code conflicts with earlier requirements, is the main failure class. We further find that Verification Gate, which checks new code against prior tests and triggers rollback and retry, is the only strategy that consistently improves all models, raising final-turn quality from 75.8% to 87.9% on DeepSeek-V3 and from 31.6% to 47.3% on Llama-3.1-8B. These findings suggest that strong single-turn performance can overestimate reliability in multi-turn coding conversations. Future evaluation and tool design should test whether later code suggestions preserve earlier requirements and should include Verification Gate mechanisms.