arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.11734cs.CY
收藏

让我们向AI询问它们的程序:探索ChatGPT对程序理解问题的解答

Let's Ask AI About Their Programs: Exploring ChatGPT's Answers To Program Comprehension Questions

Teemu Lehtinen, Charles Koutcheme, Arto Hellas

AI总结:

本研究探索GPT-3.5、GPT-4回答由自身生成代码对应的程序理解问题的能力,发现它们易犯新手程序员同类错误,揭示其易错性,同时提出可利用LLMs模拟学生行为的未来研究方向。

摘要:

近期研究探索了基于学生提交的代码生成问题的方法。这类“学习者代码问题(QLCs)”通过程序分析、探索执行路径,再基于这些路径和更广泛的代码结构生成程序理解问题。回答这类问题需要阅读和追踪代码,已知这一过程有助于学生学习。与此同时,计算教育研究者见证了大语言模型(LLMs)的崛起,其在领域内引发了巨大轰动。研究者已证实这类模型的适用性,尤其在入门编程场景中,阐明了它们在解决入门编程问题上的表现,以及在生成新型学习资源方面的效用。本研究探索了当前最先进的大语言模型(GPT-3.5和GPT-4)回答由其自身生成的代码所对应的QLCs的能力。结果显示,尽管这些顶尖LLMs能够编写程序,且在提示下能追踪程序执行,但它们很容易犯此前记录中新手程序员常出现的同类错误。这些结果证明了这类模型的易错性,或许能降低近期LLM炒作所推高的预期。同时,本研究也指出了未来的研究方向,例如利用LLMs模拟学生行为,因为在某些特定任务中二者的行为确实存在相似性。

英文摘要:

Recent research has explored the creation of questions from code submitted by students. These Questions about Learners' Code (QLCs) are created through program analysis, exploring execution paths, and then creating code comprehension questions from these paths and the broader code structure. Responding to the questions requires reading and tracing the code, which is known to support students' learning. At the same time, computing education researchers have witnessed the emergence of Large Language Models (LLMs) that have taken the community by storm. Researchers have demonstrated the applicability of these models especially in the introductory programming context, outlining their performance in solving introductory programming problems and their utility in creating new learning resources. In this work, we explore the capability of the state-of-the-art LLMs (GPT-3.5 and GPT-4) in answering QLCs that are generated from code that the LLMs have created. Our results show that although the state-of-the-art LLMs can create programs and trace program execution when prompted, they easily succumb to similar errors that have previously been recorded for novice programmers. These results demonstrate the fallibility of these models and perhaps dampen the expectations fueled by the recent LLM hype. At the same time, we also highlight future research possibilities such as using LLMs to mimic students as their behavior can indeed be similar for some specific tasks.

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

↑