arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.08545cs.AIcs.CLcs.SE
收藏

面向学习者的程序修复:一种具有迭代编辑驱动检索增强的解决方案生成器

Learner-Tailored Program Repair: A Solution Generator with Iterative Edit-Driven Retrieval Enhancement

Zhenlong Dai, Zhuoluo Zhao, Hengning Wang, Xiu Tang, Sai Wu, Chang Yao, Zhipeng Gao, Jingyuan Chen

AI总结:

本文提出面向学习者的程序修复任务及LSGEN框架,通过迭代编辑驱动检索增强方法提升程序修复效果,实验验证其在编程辅导中的有效性。

摘要:

随着大型语言模型(LLMs)在编程领域的发展,智能编程辅导系统获得了广泛关注。然而,大多数研究集中在修复编程学习者的错误代码上,而没有提供错误的根本原因。为了解决这一差距,我们引入了一个新的任务,即LRP(面向学习者的程序修复)。我们随后提出了一种新颖且有效的框架,即LSGEN(面向学习者的解决方案生成器),以增强程序修复并提供错误代码的错误描述。在第一阶段,我们利用修复解决方案检索框架构建解决方案检索数据库,然后采用编辑驱动的代码检索方法检索有价值的解决方案,指导LLMs识别和修复错误代码中的错误。在第二阶段,我们提出了一种基于解决方案引导的程序修复方法,该方法在检索解决方案的指导下修复代码并提供解释。此外,我们提出了一种迭代检索增强方法,利用生成代码的评估结果来迭代优化检索方向并探索更合适的修复策略,从而在实际编程辅导场景中提高性能。实验结果表明,我们的方法在多个基线方法上表现显著优于,验证了我们框架在新提出的LRP任务中的有效性。

英文摘要:

With the development of large language models (LLMs) in the field of programming, intelligent programming coaching systems have gained widespread attention. However, most research focuses on repairing the buggy code of programming learners without providing the underlying causes of the bugs. To address this gap, we introduce a novel task, namely LRP (Learner-Tailored Program Repair). We then propose a novel and effective framework, LSGEN (Learner-Tailored Solution Generator), to enhance program repair while offering the bug descriptions for the buggy code. In the first stage, we utilize a repair solution retrieval framework to construct a solution retrieval database and then employ an edit-driven code retrieval approach to retrieve valuable solutions, guiding LLMs in identifying and fixing the bugs in buggy code. In the second stage, we propose a solution-guided program repair method, which fixes the code and provides explanations under the guidance of retrieval solutions. Moreover, we propose an Iterative Retrieval Enhancement method that utilizes evaluation results of the generated code to iteratively optimize the retrieval direction and explore more suitable repair strategies, improving performance in practical programming coaching scenarios. The experimental results show that our approach outperforms a set of baselines by a large margin, validating the effectiveness of our framework for the newly proposed LPR task.

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

↑