paperbot · PL 论文追踪

全部论文 待读 收藏

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

让我们向 AI 询问它们的程序:探索 ChatGPT 对程序理解问题的回答
ICSE Proceedings of the 46th International Conference on Software Engineering: Software Engineering Education and Training2024匹配度 2/10 · 论文关注 GPT-3.5/GPT-4 在教育场景中回答程序理解问题的能力评测,属于以 LLM 本身为研究目标的评测工作;它不涉及静态分析在 ML/Agentic 程序中的应用,也不涉及用 LLM/Agent 改进静态分析或形式化验证,且未覆盖浮点或贝叶斯程序分析。引用 24 inbox
Teemu Lehtinen, Charles Koutcheme, Arto Hellas
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:评估 GPT-3.5/GPT-4 回答由其自身生成代码所衍生的程序理解问题,发现其会犯与新手类似的错误。

近期研究能从学生代码中通过程序分析提取执行路径,并据此生成关于学习者代码的问题(QLC),以支持程序理解学习。与此同时,大型语言模型在入门编程中展现出生成程序与解答编程题的潜力。本文探究当前先进 LLM(GPT-3.5 与 GPT-4)回答 QLC 的能力,这些 QLC 来自模型自己生成的代码。方法上,先让 LLM 生成程序,再基于程序分析生成代码理解问题,随后提示模型作答并分析其表现。结果显示,尽管模型能生成程序并在提示下跟踪执行,但在回答程序理解问题时仍会犯新手程序员常犯的错误。这表明这些模型并不可靠,也提示可利用其类似学生的行为来模拟学生,服务于编程教育研究。

问题
现有工作能从学生代码自动生成程序理解问题,而 LLM 已能生成程序并解答入门编程题;本文关注 LLM 能否理解自己生成的代码并回答相应问题。
方法
使用 GPT-3.5 和 GPT-4 生成程序,通过程序分析生成关于执行路径与代码结构的 QLC,再提示这些模型回答并考察其执行跟踪与代码理解表现。
评估
对模型回答进行分析,并与已知新手错误模式比较;结果显示模型虽可生成代码和跟踪执行,但常犯与新手类似的错误。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{LehtinenKH24,
  title = {Let's Ask AI About Their Programs: Exploring ChatGPT's Answers To Program Comprehension Questions},
  author = {Teemu Lehtinen and Charles Koutcheme and Arto Hellas},
  booktitle = {ICSE},
  year = {2024},
  doi = {10.1145/3639474.3640058}
}