Skip to main content
QUICK REVIEW

[Paper Review] Interactions with Prompt Problems: A New Way to Teach Programming with Large Language Models

James Prather, Paul Denny|arXiv (Cornell University)|Jan 19, 2024
Topic ModelingComputer Science5 citations
TL;DR

The paper introduces Prompt Problems and the Promptly tool to teach programming using large language models, detailing design, pilot and large-scale studies of student interactions and perceptions. It analyzes how novices interact with prompt-based code generation and its educational impact.

ABSTRACT

Large Language Models (LLMs) have upended decades of pedagogy in computing education. Students previously learned to code through extit{writing} many small problems with less emphasis on code reading and comprehension. Recent research has shown that free code generation tools powered by LLMs can solve introductory programming problems presented in natural language with ease. In this paper, we propose a new way to teach programming with Prompt Problems. Students receive a problem visually, indicating how input should be transformed to output, and must translate that to a prompt for an LLM to decipher. The problem is considered correct when the code that is generated by the student prompt can pass all test cases. In this paper we present the design of this tool, discuss student interactions with it as they learn, and provide insights into this new class of programming problems as well as the design tools that integrate LLMs.

Motivation & Objective

  • Propose a novel programming pedagogy that leverages large language models via prompt-based tasks.
  • Design and implement a teaching tool (Promptly) to scaffold prompt generation and code evaluation.
  • Investigate how novices interact with Prompt Problems and how this affects learning programming concepts.
  • Assess student perceptions of Prompt Problems as a learning aid and its potential educational benefits.

Proposed method

  • Design and deploy a visual problem representation where students craft prompts to generate code.
  • Use an automated test suite to validate generated code against predefined test cases to ensure correctness.
  • Iteratively develop the Promptly tool using React/NodeJS with a serverless backend and a CodeRunner sandbox.
  • Conduct exploratory, pilot, and large-scale studies across CS1 courses to observe interactions and learning effects.
  • Analyze qualitative data with reflexive thematic analysis and quantitative engagement metrics across studies.
Figure 1 . Left: An overview of the process of our data collection over three sequential studies. Right: How the Prompt Problems work in the tool we designed, Promptly .
Figure 1 . Left: An overview of the process of our data collection over three sequential studies. Right: How the Prompt Problems work in the tool we designed, Promptly .

Experimental results

Research questions

  • RQ1RQ1: How do students interact with Prompt Problems while learning programming?
  • RQ2RQ2: How do students perceive Prompt Problems affecting their learning of programming concepts?

Key findings

  • Prompt Problems scaffold novices through problem decomposition, specification writing, and code reading, with iterative prompt refinement until tests pass.
  • In pilot study, 58 of 414 students (14%) attempted at least one Promptly question, with average prompt submission counts per problem around 2.7, 2.16, and 6.4.
  • Large-scale labs showed 386 attempts in Lab 10 and 381 attempts in Lab 11, with 202 (52%) and 147 (39%) attempts involving Promptly exercises respectively.
  • Most students reported benefits such as exposure to new programming constructs and strengthened computational thinking, while a minority expressed concerns about reliance on AI tools.
  • Lessons informed adjustments to problem design, aiming to balance prompt difficulty and accessibility to maintain engagement and scaffold learning.
Figure 2 . The tool we created, Promptly , showing the user solving the problem by submitting a prompt.
Figure 2 . The tool we created, Promptly , showing the user solving the problem by submitting a prompt.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.