Exploring the Value of Diverse LLM Explanations in Introductory Programming

Seth Bernstein, Paul Denny, Juho Leinonen, Kush Patel, Rayhona Nasimova +2 more
6/27/2026
cs.HCcs.AI

No confident code implementation found for this paper.

Abstract

Large 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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bernstein2026exploring,
  title  = {Exploring the Value of Diverse LLM Explanations in Introductory Programming},
  author = {Seth Bernstein and Paul Denny and Juho Leinonen and Kush Patel and Rayhona Nasimova and Matt Littlefield and Stephen MacNeil},
  year   = {2026},
  eprint = {2606.28882},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.28882v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.28882.svg)](https://codeofpaper.com/paper/2606.28882)

Discussion