Teaching Prompt-Based Programming with LLMs: A 45-Minute Lesson with Guided Practice for End-User Programmers
In plain terms
Large Language Models (LLMs) enable a new way of programming where users describe their computational goals in natural language, known as "prompt-based programming." However, users, especially those new to computer science, often struggle to write clear and specific instructions, or "prompts," for these LLMs, leading to less effective results. This study investigated whether a brief lesson could help address this issue. The researchers developed a 45-minute lesson with guided practice focused on teaching effective prompt writing for LLMs. They then conducted a randomized controlled study with 55 engineering students, comparing the effectiveness of this lesson against a standard computer science activity of the same duration. The findings showed that students who received the prompt-based programming lesson improved more in their ability to specify computational goals to LLMs and significantly increased their confidence in using prompts, compared to the control group. This suggests that even a short intervention can start to improve learners' skills in interacting with LLMs, though developing deeper proficiency might require more extensive practice.