Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Language

被引:137
作者
Denny, Paul [1 ]
Kumar, Viraj [2 ]
Giacaman, Nasser [1 ]
机构
[1] Univ Auckland, Auckland, New Zealand
[2] Indian Inst Sci, Bengaluru, India
来源
PROCEEDINGS OF THE 54TH ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, VOL 1, SIGCSE 2023 | 2023年
关键词
OpenAI; GitHub Copilot; foundation models; large language models; CS1; artificial intelligence; introductory programming;
D O I
10.1145/3545945.3569823
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
GitHub Copilot is an artificial intelligence tool 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 its potential impact 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.
引用
收藏
页码:1136 / 1142
页数:7
相关论文
共 26 条
[1]  
Austin Jacob, 2021, PREPRINT
[2]  
Barke S, 2022, Arxiv, DOI arXiv:2206.15000
[3]   On the Dangers of Stochastic Parrots: Can Language Models Be Too Big? [J].
Bender, Emily M. ;
Gebru, Timnit ;
McMillan-Major, Angelina ;
Shmitchell, Shmargaret .
PROCEEDINGS OF THE 2021 ACM CONFERENCE ON FAIRNESS, ACCOUNTABILITY, AND TRANSPARENCY, FACCT 2021, 2021, :610-623
[4]  
Bommasani R, 2021, arXiv, DOI [DOI 10.48550/ARXIV.2108.07258, 10.48550/arXiv.2108.07258]
[5]  
Brown TB, 2020, ADV NEUR IN, V33
[6]  
Chen M., 2021, arXiv
[7]  
Cunningham Kathryn, 2021, P 2021 CHI C HUM FAC, DOI DOI 10.1145/3411764.3445571
[8]  
Denny P., 2022, arXiv
[9]   AI-Driven Development Is Here: Should You Worry? [J].
Ernst, Neil A. ;
Bavota, Gabriele .
IEEE SOFTWARE, 2022, 39 (02) :106-110
[10]  
Finnie-Ansley James, 2023, ACE '23: Australasian Computing Education Conference, P97, DOI 10.1145/3576123.3576134