Table of Contents
Fetching ...

Human-AI Co-Creation of Worked Examples for Programming Classes

Mohammad Hassany, Peter Brusilovsky, Jiaze Ke, Kamil Akhuseyinoglu, Arun Balajiee Lekshmi Narayanan

TL;DR

The paper addresses the challenge of producing high-quality line-by-line explanations for Java worked examples at scale in programming classes. It proposes a human-AI co-creation workflow implemented in WEAT, where instructors provide code and problems and an LLM generates explanations that can be edited and assembled by the instructor. Through three feasibility studies and an instructor usability evaluation, the authors show that LLM-generated explanations can serve as effective starting points, often rated as more complete than human-authored fragments, while readability and alignment to student vocabulary remain concerns. The work contributes a practical authoring tool, empirical evidence for co-creation benefits, and a roadmap for larger-scale evaluations to support scalable, interactive programming education.

Abstract

Worked examples (solutions to typical programming problems presented as a source code in a certain language and are used to explain the topics from a programming class) are among the most popular types of learning content in programming classes. Most approaches and tools for presenting these examples to students are based on line-by-line explanations of the example code. However, instructors rarely have time to provide line-by-line explanations for a large number of examples typically used in a programming class. In this paper, we explore and assess a human-AI collaboration approach to authoring worked examples for Java programming. We introduce an authoring system for creating Java worked examples that generates a starting version of code explanations and presents it to the instructor to edit if necessary.We also present a study that assesses the quality of explanations created with this approach

Human-AI Co-Creation of Worked Examples for Programming Classes

TL;DR

The paper addresses the challenge of producing high-quality line-by-line explanations for Java worked examples at scale in programming classes. It proposes a human-AI co-creation workflow implemented in WEAT, where instructors provide code and problems and an LLM generates explanations that can be edited and assembled by the instructor. Through three feasibility studies and an instructor usability evaluation, the authors show that LLM-generated explanations can serve as effective starting points, often rated as more complete than human-authored fragments, while readability and alignment to student vocabulary remain concerns. The work contributes a practical authoring tool, empirical evidence for co-creation benefits, and a roadmap for larger-scale evaluations to support scalable, interactive programming education.

Abstract

Worked examples (solutions to typical programming problems presented as a source code in a certain language and are used to explain the topics from a programming class) are among the most popular types of learning content in programming classes. Most approaches and tools for presenting these examples to students are based on line-by-line explanations of the example code. However, instructors rarely have time to provide line-by-line explanations for a large number of examples typically used in a programming class. In this paper, we explore and assess a human-AI collaboration approach to authoring worked examples for Java programming. We introduce an authoring system for creating Java worked examples that generates a starting version of code explanations and presents it to the instructor to edit if necessary.We also present a study that assesses the quality of explanations created with this approach
Paper Structure (8 sections, 4 figures, 5 tables)

This paper contains 8 sections, 4 figures, 5 tables.

Figures (4)

  • Figure 1: Studying a code example in the PCEX system: 1) title and program description, 2) program source code with lines annotated with explanations, 3) explanations for the highlighted line, 4) link to a "challenge" - a small problem related to the example.
  • Figure 2: WEAT Authoring, 1) program title and description, 2) program source code (lines with explanations are marked with a blue question mark next to the line number), 3) explanations for the selected line (the line with gray background - line 6 in the screenshot).
  • Figure 3: Human-AI Collaborative Worked Example Authoring, 1) "Generate Explanations" button, 2) default prompt (author can tune the prompt - optional), 3) program source preview, 4) generated explanations for the selected line.
  • Figure 4: An incorrect explanation fragment generated by ChatGPT and excluded by the author (line 3).