arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2309.14049cs.HC
收藏

新手如何在自定进度学习环境中使用基于大语言模型的代码生成器解决CS1编程任务

How Novices Use LLM-Based Code Generators to Solve CS1 Coding Tasks in a Self-Paced Learning Environment

Majeed Kazemitabaar, Xinying Hou, Austin Henley, Barbara J. Ericson, David Weintrop, Tovi Grossman

AI总结:

本文通过分析33名10-17岁学习者使用Codex学习Python的过程,揭示了AI单次提示、AI逐步提示、混合式和手动编码四种编码方法,并发现AI单次提示在编写任务上正确性最高但在修改任务上最低,为AI代码生成器融入自定进度学习环境提供了初步见解。

摘要:

随着大语言模型(LLMs)日益普及,理解新手程序员如何使用它们变得十分重要。我们对33名年龄在10至17岁之间的学习者进行了主题分析,这些学习者通过45个代码编写任务,使用Codex(一种基于大语言模型的代码生成器)独立学习Python。我们探讨了与学习者如何使用这些代码生成器相关的若干问题,并对所写提示和所生成代码的属性进行了分析。具体而言,我们探究了(A)学习者使用Codex的情境,(B)学习者向Codex提出的请求内容,(C)其提示在与任务描述的关系、语言和清晰度方面的属性,以及提示构造模式,(D)AI生成代码的正确性、复杂性和准确性,以及(E)学习者如何利用AI生成代码,包括放置方式、验证方式和手动修改方式。此外,我们的分析揭示了在使用AI代码生成器编写代码时存在四种不同的编码方法:AI单次提示,即学习者仅向Codex提示一次以生成任务的完整解决方案;AI逐步提示,即学习者将问题分解为多个部分,并使用Codex生成每个部分;混合式,即学习者自己编写部分代码,并使用Codex生成其他部分;以及手动编码,即学习者完全自己编写代码。AI单次提示方法在代码编写任务上取得了最高的正确性得分,但在训练期间的后续代码修改任务上取得了最低的正确性得分。我们的研究结果为了解新手学习者如何使用AI代码生成器,以及将其整合到自定进度学习环境中所面临的挑战和机遇提供了初步见解。最后,我们总结了过度依赖和自我调节的各种迹象,以及课程和工具开发的机会。

英文摘要:

As Large Language Models (LLMs) gain in popularity, it is important to understand how novice programmers use them. We present a thematic analysis of 33 learners, aged 10-17, independently learning Python through 45 code-authoring tasks using Codex, an LLM-based code generator. We explore several questions related to how learners used these code generators and provide an analysis of the properties of the written prompts and the generated code. Specifically, we explore (A) the context in which learners use Codex, (B) what learners are asking from Codex, (C) properties of their prompts in terms of relation to task description, language, and clarity, and prompt crafting patterns, (D) the correctness, complexity, and accuracy of the AI-generated code, and (E) how learners utilize AI-generated code in terms of placement, verification, and manual modifications. Furthermore, our analysis reveals four distinct coding approaches when writing code with an AI code generator: AI Single Prompt, where learners prompted Codex once to generate the entire solution to a task; AI Step-by-Step, where learners divided the problem into parts and used Codex to generate each part; Hybrid, where learners wrote some of the code themselves and used Codex to generate others; and Manual coding, where learners wrote the code themselves. The AI Single Prompt approach resulted in the highest correctness scores on code-authoring tasks, but the lowest correctness scores on subsequent code-modification tasks during training. Our results provide initial insight into how novice learners use AI code generators and the challenges and opportunities associated with integrating them into self-paced learning environments. We conclude with various signs of over-reliance and self-regulation, as well as opportunities for curriculum and tool development.

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

↑