Teaching Prompt-Based Programming with LLMs: A 45-Minute Lesson with Guided Practice for End-User Programmers
2026-06-29 • Computers and Society
Computers and Society
AI summaryⓘ
The authors studied a quick 45-minute lesson to teach engineering students how to give clear instructions to large language models (LLMs) using natural language instead of traditional coding. They compared this lesson to a typical programming activity and found the lesson helped students feel more confident about prompting LLMs and showed some improvement in their skills. However, the improvement was small, suggesting that learning to communicate well with LLMs might take more time and practice. The authors designed the lesson to be easy to add to existing classes without needing prior computer science knowledge.
prompt-based programminglarge language modelsnatural language processingself-efficacycomputer science educationcode tracingrandomized controlled studyinstructional interventionengineering education
Authors
Keith Tran, Samiha Marwan, Thomas Price
Abstract
Prompt-based programming, a new modality enabled by large language models (LLMs), allows users to express computational goals through natural language rather than traditional code. While this approach lowers barriers to entry, especially for non-CS learners, it does not eliminate the need for foundational CS skills. Learners often struggle to communicate their intent clearly to LLMs, resulting in vague or underspecified prompts. Prior work has documented the need for explicit prompting for both CS and non-CS learners. However, it remains less clear how such instruction can fit into busy classrooms or how much time is needed to produce meaningful gains. In this paper, we evaluated a 45-minute prompt-based programming intervention, consisting of a lesson with guided practice, against a business-as-usual CS lab activity (code tracing) of equal length, representing a class without prompt-focused instruction. We conducted a randomized controlled study with 55 engineering students. We found that students in the experimental condition improved more on average (though not significantly more) from pre- to post-test than the control group (+10.8 vs +1.1 percentage points) and showed significantly greater average gains in prompting self-efficacy (+35.4 vs +21.9 percentage points). Our results suggest it is likely that a brief intervention can improve learners' ability to specify computational goals to LLMs. However, the effect was modest, suggesting that prompting skills may require more time and practice to develop. We provide a lightweight lesson that requires no prior CS background and can be readily dropped into existing courses.