May 11–16, 2024, Honolulu, HI, USA | Sydney Nguyen, Hannah McLean Babe, Yangtian Zi, Arjun Guha, Carolyn Jane Anderson, Molly Q Feldman
This paper explores how beginning programmers interact with large language models (LLMs) for text-to-code generation. The study, conducted at three academic institutions, involves 120 students who have completed an introductory computer science course (CS1). The researchers designed a controlled experiment to isolate the prompt creation and editing processes, using input/output examples instead of natural language descriptions to avoid bias. The study found that students struggled significantly with writing and editing prompts, even for problems at their skill level, and that the LLMs often failed to generate correct code. The results highlight the challenges non-experts face in using Code LLMs and suggest that traditional programming education remains crucial for effective code understanding and communication. The study also reveals insights into students' mental models of LLMs and their perceptions of the task, providing implications for both education and the broader use of Code LLMs.This paper explores how beginning programmers interact with large language models (LLMs) for text-to-code generation. The study, conducted at three academic institutions, involves 120 students who have completed an introductory computer science course (CS1). The researchers designed a controlled experiment to isolate the prompt creation and editing processes, using input/output examples instead of natural language descriptions to avoid bias. The study found that students struggled significantly with writing and editing prompts, even for problems at their skill level, and that the LLMs often failed to generate correct code. The results highlight the challenges non-experts face in using Code LLMs and suggest that traditional programming education remains crucial for effective code understanding and communication. The study also reveals insights into students' mental models of LLMs and their perceptions of the task, providing implications for both education and the broader use of Code LLMs.