CREF:一个基于大语言模型的面向编程辅导教师的对话式软件修复框架
CREF: An LLM-based Conversational Software Repair Framework for Programming Tutors
AI总结:
本文提出对话式半自动程序修复框架CREF,并构建非爬取基准TutorCode,通过结合辅导教师指导与历史对话显著提升大语言模型的程序修复性能。
摘要:
程序修复技术在软件开发和编程教育场景的调试过程中具有节省成本的优势。随着大语言模型(LLMs)在代码相关任务中展现出已被证实的有效性,研究人员已经探索了它们在程序修复方面的潜力。然而,必须认识到现有的修复基准可能已经影响了大语言模型的训练数据,从而可能导致数据泄漏。为了评估大语言模型在现实条件下的修复能力,(1)我们引入了一个广泛的、非爬取式的基准,称为TutorCode,它包含1,239个C++缺陷代码以及相关信息,如辅导教师指导、解决方案描述、失败测试用例和修正后的代码。我们的工作评估了12个大语言模型在TutorCode上的修复性能,衡量了修复正确率(TOP-5和AVG-5)以及补丁精度(RPSR)。(2)随后,我们针对哪些类型的额外信息能够帮助大语言模型提高其缺陷修复性能进行了全面的研究。在这些信息类型中,辅导教师指导被发现是增强大语言模型修复能力最有效的信息。为了充分利用大语言模型的对话能力以及增强信息带来的好处,(3)我们引入了一个新颖的对话式半自动修复框架CREF,用于辅助人类辅导教师。与基线相比,它展示了17.2%-24.6%的显著AVG-5提升,在使用GPT-4时达到了令人印象深刻的76.6%的AVG-5。这些结果凸显了通过辅导教师互动以及涉及错误响应的历史对话来增强大语言模型修复能力的潜力。CREF在真实教育环境中的成功应用证明了它在减少辅导教师工作量和改善学生学习体验方面的有效性,同时也展示了它在促进其他软件工程任务(如代码审查)方面的前景。
英文摘要:
Program repair techniques offer cost-saving benefits for debugging within software development and programming education scenarios. With the proven effectiveness of Large Language Models (LLMs) in code-related tasks, researchers have explored their potential for program repair. However, it is crucial to recognize that existing repair benchmarks may have influenced LLM training data, potentially causing data leakage. To evaluate LLMs' realistic repair capabilities, (1) we introduce an extensive, non-crawled benchmark, referred to as TutorCode, comprising 1,239 C++ defect codes and associated information such as tutor guidance, solution description, failing test cases, and the corrected code. Our work assesses the repair performance of 12 LLMs on TutorCode, measuring repair correctness (TOP-5 and AVG-5) and patch precision (RPSR). (2) We then provide a comprehensive investigation into which types of extra information can help LLMs improve their performance in repairing defects. Among these types, tutor guidance was found to be the most effective information in enhancing LLM repair capabilities. To fully harness LLMs' conversational capabilities and the benefits of augmented information, (3) we introduce a novel conversational semi-automatic repair framework CREF assisting human tutor. It demonstrates a remarkable AVG-5 improvement of 17.2%-24.6% compared to the baseline, achieving an impressive AVG-5 of 76.6% when utilizing GPT-4. These results highlight the potential for enhancing LLMs' repair capabilities through interactions with tutors and historical conversations involving incorrect responses. The successful application of CREF in a real-world educational setting demonstrates its effectiveness in reducing tutors' workload and improving students' learning experience, while also showcasing its promise for facilitating other software engineering tasks, such as code review.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。