Exploring the Value of Diverse LLM Explanations in Introductory Programming
This paper explores the effectiveness of diverse LLM-generated explanations versus generic explanations in computer science education, finding that diverse explanations led to higher open-ended response accuracy with no difference in perceived cognitive load.
This paper contributes novel insights into the use of diverse LLM-generated explanations in computer science education and their impact on student understanding.
Before reading this…
Applications
- →Computer science education
- →Automated code explanation generation
To understand this paper, make sure you know these concepts first:
- Basic understanding of programming conceptsfind papers →
- Familiarity with Large Language Modelsfind papers →
Abstract
More Like ThisLarge Language Models (LLMs) have shown the potential to generate code explanations that surpass those of peers in quality, offering promising opportunities for computer science education. While these explanations may not yet match the depth and clarity of instructor-provided explanations, research in computational creativity highlights that the quantity and diversity of ideas can often outweigh a singular focus on quality. Inspired by this, we explore whether combining multiple diverse explanations, each emphasizing distinct aspects (e.g., function, concept, goal), can enhance students' understanding of programming exercises compared to generic explanations that do not emphasize distinct conceptual aspects. In our study 971 first-year computing students were randomly assigned either diverse or generic LLM-generated explanations for two programming exercises. Students completed multiple-choice and open-ended questions for each exercise, followed by Likert-scale questions and open-ended reflections. Our findings outline patterns in student performance and perceived cognitive load across the two explanation conditions. These findings highlight how variation in explanation emphasis may relate to learner engagement and understanding. Across participants, open-ended response accuracy was consistently about 7.7% higher when students received diverse explanations, with no difference in perceived cognitive load.