用大模型和强化学习生成编程纠错提示,帮助初学者互动式学编程。
ACE-RLHF: Automated Code Evaluation and Socratic Feedback Generation Tool using Large Language Models and Reinforcement Learning with Human Feedback
- 用RLHF微调大模型,生成带提示的苏格拉底式反馈。
- 在基础与竞赛级题目上,准确率比无强化学习方法高2-5%。
- 适合编程教学、自动评阅系统开发者使用。
自动化程序修复工具用于生成错误代码的反馈并建议修复方法。现有顶尖代码修复方法依赖数据驱动,对复杂编程问题常失效。为理解未见过的编程问题自然语言,使用大语言模型(LLMs)生成反馈至关重要。相比编译器报错信息,LLMs输出更易懂;结合人类反馈的强化学习(RLHF)进一步提升质量,助力初学者交互式学习编程。本文提出基于RLHF微调的代码反馈生成工具——ACE-RLHF,融合两个开源LLM模型与两种主流优化技术。在包含基础与竞赛级题目的两个基准数据集上评估,使用Llama-3-7B与近端策略优化(PPO)时,自动评估下准确率比无RL方法高出2-5%;与无需奖励模型的AI反馈强化学习(RLAIF)相比,表现相当或略优。手动评估中,采用GPT-3.5 Best-of-n优化时,准确率提升近40%。
原文摘要 · Abstract (English)
Automated Program Repair tools are developed for generating feedback and suggesting a repair method for erroneous code. State of the art (SOTA) code repair methods rely on data-driven approaches and often fail to deliver solution for complicated programming questions. To interpret the natural language of unprecedented programming problems, using Large Language Models (LLMs) for code-feedback generation is crucial. LLMs generate more comprehensible feedback than compiler-generated error messages, and Reinforcement Learning with Human Feedback (RLHF) further enhances quality by integrating human-in-the-loop which helps novice students to lean programming from scratch interactively. We are applying RLHF fine-tuning technique for an expected Socratic response such as a question with hint to solve the programming issue. We are proposing code feedback generation tool by fine-tuning LLM with RLHF, Automated Code Evaluation with RLHF (ACE-RLHF), combining two open-source LLM models with two different SOTA optimization techniques. The quality of feedback is evaluated on two benchmark datasets containing basic and competition-level programming questions where the later is proposed by us. We achieved 2-5% higher accuracy than RL-free SOTA techniques using Llama-3-7B-Proximal-policy optimization in automated evaluation and similar or slightly higher accuracy compared to reward model-free RL with AI Feedback (RLAIF). We achieved almost 40% higher accuracy with GPT-3.5 Best-of-n optimization while performing manual evaluation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。