并非银弹:LLM增强的编程错误信息在实践中无效
Not the Silver Bullet: LLM-enhanced Programming Error Messages are Ineffective in Practice
AI总结:
研究通过106人实验发现,尽管GPT-4在合成基准上表现优异,但其在真实场景中生成的编程错误信息仅在1/6任务上优于传统编译器,专家手写解释仍具优势。
摘要:
ChatGPT等大型语言模型(LLMs)的突然出现对整个计算机教育界产生了颠覆性影响。研究表明,LLMs在为CS1和CS2问题生成正确代码方面表现出色,甚至可以作为学习编程的学生的友好助手。近期工作显示,LLMs在解释和解决编译器错误信息方面展现出绝对优势——这数十年来一直是学习编程过程中最令人沮丧的部分之一。然而,LLM生成的错误信息解释仅在人工条件下由专家程序员进行过评估。本研究旨在了解新手程序员在更真实的场景中如何解决编程错误信息(PEMs)。我们进行了一项包含106名参与者的被试内研究,学生被要求修复六个有缺陷的C程序。对于每个程序,参与者被随机分配使用标准编译器错误信息、专家手写的错误信息或GPT-4生成的错误信息解释来修复问题。尽管在合成基准测试上有令人鼓舞的证据,但根据学生修复每个问题的时间来衡量,我们发现GPT-4生成的错误信息仅在6个任务中的1个上优于传统编译器错误信息。在客观和主观指标上,手写解释仍然优于LLM和传统错误信息。
英文摘要:
The sudden emergence of large language models (LLMs) such as ChatGPT has had a disruptive impact throughout the computing education community. LLMs have been shown to excel at producing correct code to CS1 and CS2 problems, and can even act as friendly assistants to students learning how to code. Recent work shows that LLMs demonstrate unequivocally superior results in being able to explain and resolve compiler error messages -- for decades, one of the most frustrating parts of learning how to code. However, LLM-generated error message explanations have only been assessed by expert programmers in artificial conditions. This work sought to understand how novice programmers resolve programming error messages (PEMs) in a more realistic scenario. We ran a within-subjects study with $n$ = 106 participants in which students were tasked to fix six buggy C programs. For each program, participants were randomly assigned to fix the problem using either a stock compiler error message, an expert-handwritten error message, or an error message explanation generated by GPT-4. Despite promising evidence on synthetic benchmarks, we found that GPT-4 generated error messages outperformed conventional compiler error messages in only 1 of the 6 tasks, measured by students' time-to-fix each problem. Handwritten explanations still outperform LLM and conventional error messages, both on objective and subjective measures.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。