与Copilot对话:探索使用自然语言解决CS1问题的提示工程
Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Language
摘要:
GitHub Copilot是一个人工智能模型,用于从自然语言问题描述自动生成源代码。自2022年6月以来,Copilot已正式免费提供给所有学生作为Visual Studio Code等开发环境的插件。之前探索OpenAI Codex(Copilot的底层模型)的工作表明,它在典型的CS1问题上表现良好,因此人们担心它会对入门编程课程的教学产生影响。然而,关于Copilot不能很好地执行的问题类型,或者关于学生在解决错误时可能与Copilot进行的自然语言交互,我们知之甚少。我们通过评估Copilot在166个编程问题的公开数据集上的性能来探索这些问题。我们发现,它成功地解决了大约一半的这些问题的第一次尝试,它解决了60%的剩余问题,只使用自然语言的问题描述的变化。我们认为,这种类型的提示工程,我们相信将成为一个标准的人类和Copilot之间的互动时,它最初失败,是一个潜在的有用的学习活动,促进计算思维技能,并有可能改变代码编写技能的发展的性质。
英文摘要:
GitHub Copilot is an artificial intelligence model for automatically generating source code from natural language problem descriptions. Since June 2022, Copilot has officially been available for free to all students as a plug-in to development environments like Visual Studio Code. Prior work exploring OpenAI Codex, the underlying model that powers Copilot, has shown it performs well on typical CS1 problems thus raising concerns about the impact it will have on how introductory programming courses are taught. However, little is known about the types of problems for which Copilot does not perform well, or about the natural language interactions that a student might have with Copilot when resolving errors. We explore these questions by evaluating the performance of Copilot on a publicly available dataset of 166 programming problems. We find that it successfully solves around half of these problems on its very first attempt, and that it solves 60\% of the remaining problems using only natural language changes to the problem description. We argue that this type of prompt engineering, which we believe will become a standard interaction between human and Copilot when it initially fails, is a potentially useful learning activity that promotes computational thinking skills, and is likely to change the nature of code writing skill development.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。