[论文解读] Generating High-Precision Feedback for Programming Syntax Errors using Large Language Models
本文提出 PyFiXV,这是一个由 Codex 支持的系统,能够为 Python 语法错误生成高精度反馈,并带有用于控制精度和覆盖率的运行时验证开关。
Large language models (LLMs), such as Codex, hold great promise in enhancing programming education by automatically generating feedback for students. We investigate using LLMs to generate feedback for fixing syntax errors in Python programs, a key scenario in introductory programming. More concretely, given a student's buggy program, our goal is to generate feedback comprising a fixed program along with a natural language explanation describing the errors/fixes, inspired by how a human tutor would give feedback. While using LLMs is promising, the critical challenge is to ensure high precision in the generated feedback, which is imperative before deploying such technology in classrooms. The main research question we study is: Can we develop LLMs-based feedback generation techniques with a tunable precision parameter, giving educators quality control over the feedback that students receive? To this end, we introduce PyFiXV, our technique to generate high-precision feedback powered by Codex. The key idea behind PyFiXV is to use a novel run-time validation mechanism to decide whether the generated feedback is suitable for sharing with the student; notably, this validation mechanism also provides a precision knob to educators. We perform an extensive evaluation using two real-world datasets of Python programs with syntax errors and show the efficacy of PyFiXV in generating high-precision feedback.
研究动机与目标
- 在入门编程中激发对语法错误的自动化、精确反馈生成。
- 将反馈形式化为一个固定程序加上自然语言解释。
- 开发 PyFiXV,使运行时验证机制充当教育者的精度旋钮。
- 在实际的 Python 数据集上评估 PyFiXV,并公开实现。
提出的方法
- 阶段1 使用 Codex-Edit 将有错误的程序修复为语法正确的固定程序。
- 阶段2 使用 Codex-Complete 结合精心选择的少量示例生成自然语言解释。
- 阶段3 通过查询 Codex-Edit 来模拟学生模型,并基于基于 AST 的精确匹配来判断是否接受生成的反馈。
- 在阶段3 引入可调超参数以实现精度-覆盖率权衡,以达到期望的精度水平。
- 使用标定数据集选择能在最大化覆盖率的同时达到目标精度的超参数。
实验结果
研究问题
- RQ1我们能否开发带有可调精度参数的基于LLM的反馈生成技术,以获得高质量的反馈?
- RQ2运行时验证如何影响对语法错误的反馈的精度和覆盖率?
- RQ3少量示例选择对 Codex-Complete 生成解释的质量有何影响?
- RQ4在现实世界的 Python 数据集上,PyFiXV 在精度和覆盖率方面的表现如何?
主要发现
| 技术 | TigerJython 精度 | TigerJython 覆盖率 | Codeforces 精度 | Codeforces 覆盖率 |
|---|---|---|---|---|
| PyFi-PEM | 5.0 (1.0) | 92.5 (1.6) | 35.0 (2.4) | 98.8 (0.8) |
| PyFiX_{shot:None} | 0.9 (0.5) | 92.5 (1.6) | 3.0 (0.4) | 98.8 (0.8) |
| PyFiX_{shot:Rand} | 21.6 (1.7) | 92.5 (1.6) | 48.5 (2.6) | 98.8 (0.8) |
| PyFiX_{shot:Sel} | 38.9 (3.5) | 92.5 (1.6) | 55.2 (3.9) | 98.8 (0.8) |
| PyFi||X_{shot:Sel} | 15.8 (1.8) | 92.5 (1.6) | 15.6 (2.8) | 98.8 (0.8) |
| PyFiX-Rule_{P>=70} | 48.6 (4.4) | 30.8 (12.5) | 61.6 (9.0) | 38.3 (10.5) |
| PyFiXV_{P>=70} | 76.0 (4.0) | 31.2 (4.0) | 72.4 (6.2) | 64.2 (6.3) |
| PyFiX-Opt_{P≈V_{P>=70}} | 76.1 (0.4) | 47.1 (3.4) | 72.8 (0.1) | 75.0 (5.7) |
- PyFiXV 通过可调旋钮实现高精度,同时权衡覆盖率,在 TigerJython 和 Codeforces 数据集上得到证明。
- 阶段1 通过小的编辑修复有缺陷的程序,具有较高的可行性(高反馈生成成功率)。
- 阶段2 的解释,在少量示例的辅助下,提升了解释的相关性和正确性。
- 阶段3 使用模拟学生模型(Codex-Edit)进行验证,提供稳健的精度机制,在实验中优于基于规则的验证。
- 经过标定的 PyFiXV 变体在不同数据集上达到具有竞争力的精度-覆盖率权衡。
- 比较变体表明所提出的验证机制显著提高了相对于基线如基于长度的验证的精度。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。