Comparing Code Explanations Created by Students and Large Language Models
Not on the map. Why?
Abstract (arXiv)
Reasoning about code and explaining its purpose are fundamental skills for computer scientists. There has been extensive research in the field of computing education on the relationship between a student's ability to explain code and other skills such as writing and tracing code. In particular, the ability to describe at a high-level of abstraction how code will behave over all possible inputs correlates strongly with code writing skills. However, developing the expertise to comprehend and explain code accurately and succinctly is a challenge for many students. Existing pedagogical approaches that scaffold the ability to explain code, such as producing exemplar code explanations on demand, do not currently scale well to large classrooms. The recent emergence of powerful large language models (LLMs) may offer a solution. In this paper, we explore the potential of LLMs in generating explanations that can serve as examples to scaffold students' ability to understand and explain code. To evaluate LLM-created explanations, we compare them with explanations created by students in a large course (n ≈ 1000) with respect to accuracy, understandability and length. We find that LLM-created explanations, which can be produced automatically on demand, are rated as being significantly easier to understand and more accurate summaries of code than student-created explanations. We discuss the significance of this finding, and suggest how such models can be incorporated into introductory programming education.
Key facts. Cited by 64 papers in the map (data through 14 Oct 2026). Builds on 9 of its 52 references that are in the map. First posted on arXiv 8 Apr 2023.
Builds on
9 of 52 references.
References · 9
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022Automatic Generation of Programming Exercises and Code Explanations using Large Language Modelscited by 126
- 2022Programming Is Hard -- Or at Least It Used to Be: Educational Opportunities And Challenges of AI Code Generationcited by 99
- 2022Experiences from Using Code Explanations Generated by Large Language Models in a Web Software Development E-Bookcited by 84
- 2022Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Languagecited by 82
- 2022Using Large Language Models to Enhance Programming Error Messagescited by 67
- 2022Robosourcing Educational Resources -- Leveraging Large Language Models for Learnersourcingcited by 9
- 2021Students Struggle to Explain Their Own Program Codecited by 3
Built on by
Citing papers per year: 2023: 23; 2024: 29; 2025: 6; 2026: 6.
64 papers.
Sort:
By area:
- 2023StarCoder: may the source be with you!cited by 799
- 2023Evaluating Large Language Models: A Comprehensive Surveycited by 202
- 2023The Robots are Here: Navigating the Generative AI Revolution in Computing Educationcited by 86
- 2024CodeAid: Evaluating a Classroom Deployment of an LLM-based Programming Assistant that Balances Student and Educator Needscited by 84
- 2023CodeHelp: Using Large Language Models with Guardrails for Scalable Support in Programming Classescited by 72
- 2023Computing Education in the Era of Generative AIcited by 52
- 2024The Widening Gap: The Benefits and Harms of Generative AI for Novice Programmerscited by 48
- 2023Exploring the Responses of Large Language Models to Beginner Programmers' Help Requestscited by 46
- 2023Thrilled by Your Progress! Large Language Models (GPT-4) No Longer Struggle to Pass Assessments in Higher Education Programming Coursescited by 39
- 2023A Comparative Study of AI-Generated (GPT-4) and Human-crafted MCQs in Programming Educationcited by 35
- 2023StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Codecited by 32
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 26
38 more
- 2023A Comparative Analysis of Large Language Models for Code Documentation Generationcited by 24
- 2023Is AI the better programming partner? Human-Human Pair Programming vs. Human-AI pAIr Programmingcited by 20
- 2024From GPT-4 to Gemini and Beyond: Assessing the Landscape of MLLMs on Generalizability, Trustworthiness and Causality through Four Modalitiescited by 19
- 2023Promptly: Using Prompt Problems to Teach Learners How to Effectively Utilize AI Code Generatorscited by 17
- 2023Harnessing LLMs in Curricular Design: Using GPT-4 to Support Authoring of Learning Objectivescited by 16
- 2024Feedback-Generation for Programming Exercises With GPT-4cited by 14
- 2024Beyond the Hype: A Comprehensive Review of Current Trends in Generative AI Research, Teaching Practices, and Toolscited by 14
- 2023ChatGPT in the Classroom: An Analysis of Its Strengths and Weaknesses for Solving Undergraduate Computer Science Questionscited by 13
- 2023Explaining Competitive-Level Programming Solutions using LLMscited by 13
- 2024Evaluating Contextually Personalized Programming Exercises Created with Generative AIcited by 13
- 2024Large Language Models in Computer Science Education: A Systematic Literature Reviewcited by 13
- 2023Can We Trust AI-Generated Educational Content? Comparative Analysis of Human and AI-Generated Learning Resourcescited by 12
- 2024How Novice Programmers Use and Experience ChatGPT when Solving Programming Exercises in an Introductory Coursecited by 11
- 2023"It's not like Jarvis, but it's pretty close!" -- Examining ChatGPT's Usage among Undergraduate Students in Computer Sciencecited by 10
- 2025How Do Programming Students Use Generative AI?cited by 10
- 2024Iris: An AI-Driven Virtual Tutor For Computer Science Educationcited by 9
- 2024RACONTEUR: A Knowledgeable, Insightful, and Portable LLM-Powered Shell Command Explainercited by 9
- 2023AI-enhanced Auto-correction of Programming Exercises: How Effective is GPT-3.5?cited by 8
- 2024Analyzing Chat Protocols of Novice Programmers Solving Introductory Programming Tasks with ChatGPTcited by 8
- 2024Evaluating Language Models for Generating and Judging Programming Feedbackcited by 8
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMscited by 7
- 2023Learnersourcing in the Age of AI: Student, Educator and Machine Partnerships for Content Creationcited by 6
- 2023Decoding Logic Errors: A Comparative Study on Bug Detection by Students and Large Language Modelscited by 6
- 2024"ChatGPT Is Here to Help, Not to Replace Anybody" -- An Evaluation of Students' Opinions On Integrating ChatGPT In CS Coursescited by 6
- 2024Robo-Instruct: Simulator-Augmented Instruction Alignment For Finetuning Code LLMscited by 6
- 2024Synthetic Students: A Comparative Study of Bug Distribution Between Large Language Models and Computing Studentscited by 6
- 2025TableTalk: Scaffolding Spreadsheet Development with a Language Agentcited by 5
- 2023Efficient Classification of Student Help Requests in Programming Courses Using Large Language Modelscited by 4
- 2024When Geoscience Meets Generative AI and Large Language Models: Foundations, Trends, and Future Challengescited by 4
- 2024Using Large Language Models for Student-Code Guided Test Case Generation in Computer Science Educationcited by 4
- 2025Generating Planning Feedback for Open-Ended Programming Exercises with LLMscited by 4
- 2025From Prompts to Propositions: A Logic-Based Lens on Student-LLM Interactionscited by 4
- 2024Enhancing Programming Error Messages in Real Time with Generative AIcited by 3
- 2024Integrating AI Tutors in a Programming Coursecited by 3
- 2026Are We All Using Agents the Same Way? An Empirical Study of Core and Peripheral Developers Use of Coding Agentscited by 3
- 2024Benchmarking Educational Program Repaircited by 2
- 2024"Give me the code" -- Log Analysis of First-Year CS Students' Interactions With GPTcited by 2
- 2024Seeing the Forest and the Trees: Solving Visual Graph and Tree Based Data Structure Problems using Large Multimodal Modelscited by 2
50 most cited of 64 All 64 (JSON)
- 2026The Illusion of Agentic Complexity in README.md Generation: Evaluating Single-Agent vs. Multi-Agent RAG Systems29 Jun 2026
- 2026AI-Assisted Help-Seeking Trajectories in Programming Education from an SRL-Informed Perspective22 Jun 2026
- 2026AI-Generated Slides: Are They Good? Can Students Tell?13 May 2026
- 2026Pedagogical Promise and Peril of AI: A Text Mining Analysis of ChatGPT Research Discussions in Programming Education1 May 2026
- 2026From Code-Centric to Concept-Centric: Teaching NLP with LLM-Assisted "Vibe Coding"2 Feb 2026
- 2026Are We All Using Agents the Same Way? An Empirical Study of Core and Peripheral Developers Use of Coding Agents27 Jan 2026
- 2025From Prompts to Propositions: A Logic-Based Lens on Student-LLM Interactions25 Apr 2025
- 2025Impact of Comments on LLM Comprehension of Legacy Code23 Apr 2025
- 2025Generating Planning Feedback for Open-Ended Programming Exercises with LLMs11 Apr 2025
- 2025TableTalk: Scaffolding Spreadsheet Development with a Language Agent13 Feb 2025
- 2025To Google or To ChatGPT? A Comparison of CS2 Students' Information Gathering Approaches and Outcomes21 Jan 2025
- 2025How Do Programming Students Use Generative AI?17 Jan 2025
38 more
- 2024Beyond the Hype: A Comprehensive Review of Current Trends in Generative AI Research, Teaching Practices, and Tools19 Dec 2024
- 2024Breaking the Programming Language Barrier: Multilingual Prompting to Empower Non-Native English Learners17 Dec 2024
- 2024Seeing the Forest and the Trees: Solving Visual Graph and Tree Based Data Structure Problems using Large Multimodal Models15 Dec 2024
- 2024"Give me the code" -- Log Analysis of First-Year CS Students' Interactions With GPT26 Nov 2024
- 2024On the Opportunities of Large Language Models for Programming Process Data1 Nov 2024
- 2024Large Language Models in Computer Science Education: A Systematic Literature Review21 Oct 2024
- 2024Synthetic Students: A Comparative Study of Bug Distribution Between Large Language Models and Computing Students11 Oct 2024
- 2024Utilizing ChatGPT in a Data Structures and Algorithms Course: A Teaching Assistant's Perspective11 Oct 2024
- 2024Evaluating the Quality of Code Comments Generated by Large Language Models for Novice Programmers22 Sep 2024
- 2024RACONTEUR: A Knowledgeable, Insightful, and Portable LLM-Powered Shell Command Explainer3 Sep 2024
- 2024Evaluating the capability of large language models to personalize science texts for diverse middle-school-age learners9 Aug 2024
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMs7 Aug 2024
- 2024How Novice Programmers Use and Experience ChatGPT when Solving Programming Exercises in an Introductory Course30 Jul 2024
- 2024Integrating AI Tutors in a Programming Course14 Jul 2024
- 2024Evaluating Language Models for Generating and Judging Programming Feedback5 Jul 2024
- 2024Evaluating Contextually Personalized Programming Exercises Created with Generative AI11 Jun 2024
- 2024Robo-Instruct: Simulator-Augmented Instruction Alignment For Finetuning Code LLMs30 May 2024
- 2024Analyzing Chat Protocols of Novice Programmers Solving Introductory Programming Tasks with ChatGPT29 May 2024
- 2024The Widening Gap: The Benefits and Harms of Generative AI for Novice Programmers28 May 2024
- 2024Iris: An AI-Driven Virtual Tutor For Computer Science Education9 May 2024
- 2024Benchmarking Educational Program Repair8 May 2024
- 2024"ChatGPT Is Here to Help, Not to Replace Anybody" -- An Evaluation of Students' Opinions On Integrating ChatGPT In CS Courses26 Apr 2024
- 2024Feedback-Generation for Programming Exercises With GPT-47 Mar 2024
- 2024Enhancing Programming Error Messages in Real Time with Generative AI12 Feb 2024
- 2024Using Large Language Models for Student-Code Guided Test Case Generation in Computer Science Education11 Feb 2024
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctness29 Jan 2024
- 2024From GPT-4 to Gemini and Beyond: Assessing the Landscape of MLLMs on Generalizability, Trustworthiness and Causality through Four Modalities26 Jan 2024
- 2024When Geoscience Meets Generative AI and Large Language Models: Foundations, Trends, and Future Challenges25 Jan 2024
- 2024CodeAid: Evaluating a Classroom Deployment of an LLM-based Programming Assistant that Balances Student and Educator Needs20 Jan 2024
- 2023A Comparative Analysis of Large Language Models for Code Documentation Generation16 Dec 2023
- 2023A Comparative Study of AI-Generated (GPT-4) and Human-crafted MCQs in Programming Education5 Dec 2023
- 2023Decoding Logic Errors: A Comparative Study on Bug Detection by Students and Large Language Models27 Nov 2023
- 2023"It's not like Jarvis, but it's pretty close!" -- Examining ChatGPT's Usage among Undergraduate Students in Computer Science16 Nov 2023
- 2023Anticipating User Needs: Insights from Design Fiction on Conversational Agents for Computational Thinking12 Nov 2023
- 2023Efficient Classification of Student Help Requests in Programming Courses Using Large Language Models31 Oct 2023
- 2023Evaluating Large Language Models: A Comprehensive Survey30 Oct 2023
- 2023AI-enhanced Auto-correction of Programming Exercises: How Effective is GPT-3.5?24 Oct 2023
- 2023The Robots are Here: Navigating the Generative AI Revolution in Computing Education1 Oct 2023
50 newest of 64 All 64 (JSON)
- 2023StarCoder: may the source be with you!cited by 799
- 2023Evaluating Large Language Models: A Comprehensive Surveycited by 202
- 2023The Robots are Here: Navigating the Generative AI Revolution in Computing Educationcited by 86
- 2024CodeAid: Evaluating a Classroom Deployment of an LLM-based Programming Assistant that Balances Student and Educator Needscited by 84
- 2023Computing Education in the Era of Generative AIcited by 52
- 2024The Widening Gap: The Benefits and Harms of Generative AI for Novice Programmerscited by 48
- 2023Exploring the Responses of Large Language Models to Beginner Programmers' Help Requestscited by 46
- 2023Thrilled by Your Progress! Large Language Models (GPT-4) No Longer Struggle to Pass Assessments in Higher Education Programming Coursescited by 39
- 2023A Comparative Study of AI-Generated (GPT-4) and Human-crafted MCQs in Programming Educationcited by 35
- 2023StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Codecited by 32
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 26
- 2023A Comparative Analysis of Large Language Models for Code Documentation Generationcited by 24
12 most cited of 58 All 58 (JSON)
- 2026AI-Assisted Help-Seeking Trajectories in Programming Education from an SRL-Informed Perspective22 Jun 2026
- 2026AI-Generated Slides: Are They Good? Can Students Tell?13 May 2026
- 2026Pedagogical Promise and Peril of AI: A Text Mining Analysis of ChatGPT Research Discussions in Programming Education1 May 2026
- 2026From Code-Centric to Concept-Centric: Teaching NLP with LLM-Assisted "Vibe Coding"2 Feb 2026
- 2025From Prompts to Propositions: A Logic-Based Lens on Student-LLM Interactions25 Apr 2025
- 2025Impact of Comments on LLM Comprehension of Legacy Code23 Apr 2025
- 2025Generating Planning Feedback for Open-Ended Programming Exercises with LLMs11 Apr 2025
- 2025To Google or To ChatGPT? A Comparison of CS2 Students' Information Gathering Approaches and Outcomes21 Jan 2025
- 2025How Do Programming Students Use Generative AI?17 Jan 2025
- 2024Beyond the Hype: A Comprehensive Review of Current Trends in Generative AI Research, Teaching Practices, and Tools19 Dec 2024
- 2024Breaking the Programming Language Barrier: Multilingual Prompting to Empower Non-Native English Learners17 Dec 2024
- 2024"Give me the code" -- Log Analysis of First-Year CS Students' Interactions With GPT26 Nov 2024
12 newest of 58 All 58 (JSON)