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

提示问题:生成式人工智能时代的新型编程练习

Prompt Problems: A New Programming Exercise for the Generative AI Era

Paul Denny, Juho Leinonen, James Prather, Andrew Luxton-Reilly, Thezyrie Amarouche, Brett A. Becker, Brent N. Reeves

AI总结:

本文提出“提示问题”新型编程练习,通过让学生为LLM编写自然语言提示来解决问题,并推出工具Promptly支持自动评估,在CS1和CS2课程中应用,学生反馈积极。

摘要:

大型语言模型(LLMs)凭借其强大的代码生成能力,正在彻底改变计算教育领域。传统的教学实践侧重于代码编写任务,但如今重点已转向对LLM生成代码的阅读、理解和评估。伴随这一转变,一项重要的新技能正在兴起——通过为代码生成模型构建良好的提示来解决问题。在本工作中,我们引入了一种新型编程练习来磨练这一新兴技能:“提示问题”。提示问题旨在帮助学生学会如何为AI代码生成器编写有效的提示。学生通过精心设计自然语言提示来解决提示问题,该提示作为输入提供给LLM时,能输出成功解决指定编程任务的代码。我们还推出了一款名为Promptly的新型基于网络的工具,它托管了提示问题库,并支持对提示生成代码的自动评估。我们首次在CS1和CS2课程中部署了Promptly,并描述了我们的经验,包括学生对此类新活动的看法及其与工具的互动。我们发现学生对提示问题充满热情,并欣赏这些问题如何激发他们的计算思维技能,并让他们接触新的编程结构。我们讨论了未来开发提示问题新变体的想法,以及仔细研究其融入课堂教学实践的必要性。

英文摘要:

Large Language Models (LLMs) are revolutionizing the field of computing education with their powerful code-generating capabilities. Traditional pedagogical practices have focused on code writing tasks, but there is now a shift in importance towards code reading, comprehension and evaluation of LLM-generated code. Alongside this shift, an important new skill is emerging -- the ability to solve programming tasks by constructing good prompts for code-generating models. In this work we introduce a new type of programming exercise to hone this nascent skill: 'Prompt Problems'. Prompt Problems are designed to help students learn how to write effective prompts for AI code generators. A student solves a Prompt Problem by crafting a natural language prompt which, when provided as input to an LLM, outputs code that successfully solves a specified programming task. We also present a new web-based tool called Promptly which hosts a repository of Prompt Problems and supports the automated evaluation of prompt-generated code. We deploy Promptly for the first time in one CS1 and one CS2 course and describe our experiences, which include student perceptions of this new type of activity and their interactions with the tool. We find that students are enthusiastic about Prompt Problems, and appreciate how the problems engage their computational thinking skills and expose them to new programming constructs. We discuss ideas for the future development of new variations of Prompt Problems, and the need to carefully study their integration into classroom practice.

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

↑