With their remarkable ability to generate code, large language models (LLMs) are a transformative technology for computing education practice. They have created an urgent need for educators to rethink pedagogical approaches and teaching strategies for newly emerging skill sets. Traditional approaches to learning programming have focused on frequent and repeated practice at writing code. The ease with which code can now be generated has resulted in a shift in focus towards reading, understanding and evaluating LLM-generated code. In parallel with this shift, a new essential skill is emerging -- the ability to construct good prompts for code-generating models. This paper introduces a novel pedagogical concept known as a `Prompt Problem', designed to help students learn how to craft effective prompts for LLMs. A Prompt Problem challenges a student to create a natural language prompt that leads an LLM to produce the correct code for a specific problem. To support the delivery of Prompt Problems at scale, in this paper we also present a novel tool called Promptly which hosts a repository of Prompt Problems and automates the evaluation of prompt-generated code. We report empirical findings from a field study in which Promptly was deployed in a first-year Python programming course (n=54). We explore student interactions with the tool and their perceptions of the Prompt Problem concept. We found that Promptly was largely well-received by students for its ability to engage their computational thinking skills and expose them to new programming constructs. We also discuss avenues for future work, including variations on the design of Prompt Problems and the need to study their integration into the curriculum and teaching practice.
翻译:凭借生成代码的卓越能力,大型语言模型已成为计算教育实践中的变革性技术。这迫切要求教育者重新思考针对新兴技能集的教学方法及策略。传统编程学习侧重于反复、频繁地练习编写代码。由于代码生成已变得极为便捷,学习重心正转向阅读、理解与评估LLM生成的代码。与此同步,一项新的关键技能正在兴起——即为代码生成模型构建优质提示的能力。本文提出一种名为"提示问题"的新型教学概念,旨在帮助学生学习如何为LLM设计有效提示。提示问题要求学生创建自然语言提示,引导LLM针对特定问题生成正确代码。为实现提示问题的大规模应用,本文还介绍了一款名为Promptly的新工具,该工具托管提示问题库并自动评估提示生成代码的质量。我们报告了一项实地研究的实证结果:将Promptly部署于一年级Python编程课程(n=54)中,探究学生与工具的互动及其对提示问题概念的认知。研究发现,Promptly能有效激发学生的计算思维技能并助其接触新的编程结构,因而获得学生广泛好评。此外,我们讨论了未来工作方向,包括提示问题设计的变体,以及需研究其与课程及教学实践的整合途径。