บทความนี้นำเสนอรูปแบบใหม่ของแบบฝึกหัดการเขียนโปรแกรมที่เรียกว่า "Prompt Problems" ซึ่งออกแบบมาเพื่อช่วยให้นักศึกษาเรียนรู้วิธีการเขียน prompt ที่มีประสิทธิภาพสำหรับ AI ในการสร้างโค้ด โดยนักศึกษาจะได้รับโจทย์ที่แสดงให้เห็นว่าค่า input ควรถูกแปลงเป็น output อย่างไร ภารกิจของนักศึกษาคือการสร้าง prompt ภาษาธรรมชาติที่เมื่อป้อนเข้าสู่ AI จะสร้างโค้ดที่แก้ปัญหาได้สำเร็จ
บทความนี้ยังนำเสนอเครื่องมือบนเว็บที่เรียกว่า "Promptly" ซึ่งเป็นแหล่งรวม Prompt Problems และสนับสนุนการประเมินโค้ดที่สร้างขึ้นโดยอัตโนมัติ ผู้วิจัยได้ทดลองใช้ Promptly ในหลักสูตร CS1 และ CS2 และพบว่านักศึกษามีความกระตือรือร้นเกี่ยวกับ Prompt Problems และชื่นชมที่โจทย์เหล่านี้ช่วยพัฒนาทักษะการคิดเชิงคำนวณและแนะนำโครงสร้างการเขียนโปรแกรมใหม่ๆ
ศึกษาเบื้องต้น: ผู้วิจัยได้ทำการศึกษาเบื้องต้นกับนักศึกษาระดับบัณฑิตศึกษาโดยให้นักศึกษาเขียน prompt เพื่อแก้ปัญหาการเขียนโปรแกรม พบว่านักศึกษายังขาดทักษะในการเขียน prompt ที่มีประสิทธิภาพ
พัฒนาเครื่องมือ Promptly: เครื่องมือนี้ช่วยให้นักศึกษาสามารถฝึกฝนการเขียน prompt, รับโค้ดที่สร้างโดย AI และประเมินโค้ดกับชุดทดสอบ
ประเมินผลในชั้นเรียน: ผู้วิจัยได้นำ Promptly ไปใช้ในหลักสูตร CS1 และ CS2 โดยเก็บข้อมูลจำนวนครั้งที่นักศึกษาส่ง prompt, ความยาวของ prompt และความคิดเห็นของนักศึกษา
นักศึกษาส่วนใหญ่สามารถแก้ Prompt Problems ได้ภายในไม่กี่ความพยายาม
นักศึกษาชื่นชอบ Prompt Problems และรู้สึกว่าช่วยพัฒนาทักษะการคิดเชิงคำนวณ
นักศึกษาบางคนแสดงความกังวลเกี่ยวกับผลกระทบของ AI ต่อการเรียนรู้การเขียนโปรแกรม
ศึกษาผลกระทบของ Prompt Problems ในระยะยาว
พัฒนารูปแบบของ Prompt Problems ให้หลากหลายยิ่งขึ้น
ศึกษาเวลาที่เหมาะสมในการแนะนำนักศึกษาให้รู้จักกับการสร้างโค้ดโดยใช้ prompt
This paper introduces a novel type of programming exercise called "Prompt Problems" designed to help students learn how to craft effective prompts for AI code generation. Students are presented with a problem representation that illustrates how input values should be transformed into outputs. Their task is to construct a natural language prompt that, when fed to an AI, generates code that successfully solves the specified programming task.
The paper also presents a new web-based tool called "Promptly" which hosts a repository of Prompt Problems and supports the automated evaluation of prompt-generated code. The researchers deployed Promptly in one CS1 and one CS2 course and found that students were enthusiastic about Prompt Problems and appreciated how the problems engaged their computational thinking skills and exposed them to new programming constructs.
Pilot study: Researchers conducted a pilot study with graduate students, asking them to write prompts to solve programming problems. The study revealed that students lacked skills in writing effective prompts.
Development of Promptly: This tool allows students to practice prompt writing, receive AI-generated code, and evaluate the code against test cases.
Classroom evaluation: Researchers deployed Promptly in CS1 and CS2 courses, collecting data on prompt submissions, prompt length, and student perceptions.
Most students were able to solve Prompt Problems within a few attempts.
Students enjoyed Prompt Problems and found them beneficial for enhancing computational thinking skills.
Some students expressed concerns about the potential impact of AI on learning to program.
Investigate the long-term impact of Prompt Problems.
Develop more variations of Prompt Problems.
Explore the optimal timing for introducing prompt-based code generation to students.