Engaging Students with AI for Code Comprehension, Critique, and Explanation
Document Type
Book Chapter
Publication Date
12-17-2025
Department
Department of Computer Science; Department of Engineering Fundamentals; Department of Psychology and Human Factors
Abstract
Artificial intelligence (AI) has become increasingly influential in computer science (CS) education, where it holds potential for automating feedback and personalized learning. AI tools have been shown to increase equitability within CS, a notoriously male-dominated field, as well as increase the programming self-efficacy of female students – which is tied to programming success. This chapter will present a summary of how students learn to code, studies explaining how AI can be used to help students understand code, as well as provide prompt feedback for students coding in real-time. A history of the development of AI and its increasing accuracy is provided. To assess the impact of generative AI for assisting students in explaining code, the authors present data from a recent study examining the effectiveness of using AI to provide code explanations for novice programmers. The authors also provide some prompt engineering suggestions for educators to help their students increase the accuracy of the results from AI queries.
Publication Title
Artificial Intelligence in Education - Creating an Equitable, Creative, and Effective Learning Environment
Recommended Citation
Albrant, L.,
Suhag, J.,
Ureel, L.,
&
Jarvie-Eggart, M.
(2025).
Engaging Students with AI for Code Comprehension, Critique, and Explanation.
Artificial Intelligence in Education - Creating an Equitable, Creative, and Effective Learning Environment.
http://doi.org/10.5772/intechopen.1012995
Retrieved from: https://digitalcommons.mtu.edu/michigantech-p2/2557
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.
Publisher's Statement
© 2025 The Author(s). Licensee IntechOpen. Publisher’s version of record: https://doi.org/10.5772/intechopen.1012995