Navigating Pitfalls: Evaluating LLMs in Machine Learning Programming Education
Not on the map. Why?
Abstract (arXiv)
The rapid advancement of Large Language Models (LLMs) has opened new avenues in education. This study examines the use of LLMs in supporting learning in machine learning education; in particular, it focuses on the ability of LLMs to identify common errors of practice (pitfalls) in machine learning code, and their ability to provide feedback that can guide learning. Using a portfolio of code samples, we consider four different LLMs: one closed model and three open models. Whilst the most basic pitfalls are readily identified by all models, many common pitfalls are not. They particularly struggle to identify pitfalls in the early stages of the ML pipeline, especially those which can lead to information leaks, a major source of failure within applied ML projects. They also exhibit limited success at identifying pitfalls around model selection, which is a concept that students often struggle with when first transitioning from theory to practice. This questions the use of current LLMs to support machine learning education, and also raises important questions about their use by novice practitioners. Nevertheless, when LLMs successfully identify pitfalls in code, they do provide feedback that includes advice on how to proceed, emphasising their potential role in guiding learners. We also compare the capability of closed and open LLM models, and find that the gap is relatively small given the large difference in model sizes. This presents an opportunity to deploy, and potentially customise, smaller more efficient LLM models within education, avoiding risks around cost and data sharing associated with commercial models.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 25 of its 55 references that are in the map. First posted on arXiv 23 May 2025.
Builds on
25 of 55 references.
References · 25
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023A Survey of Large Language Modelscited by 2,576
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023A Comprehensive Overview of Large Language Modelscited by 648
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 110
- 2022Programming Is Hard -- Or at Least It Used to Be: Educational Opportunities And Challenges of AI Code Generationcited by 99
- 2023The Robots are Here: Navigating the Generative AI Revolution in Computing Educationcited by 86
- 2022Experiences from Using Code Explanations Generated by Large Language Models in a Web Software Development E-Bookcited by 84
- 2020Machine Learning in Python: Main developments and technology trends in data science, machine learning, and artificial intelligencecited by 82
- 2023Is GPT-4 a Good Data Analyst?cited by 70
- 2023"It's Weird That it Knows What I Want": Usability and Interactions with Copilot for Novice Programmerscited by 64
13 more
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 60
- 2022Forecast Evaluation for Data Scientists: Common Pitfalls and Best Practicescited by 55
- 2023Exploring the Responses of Large Language Models to Beginner Programmers' Help Requestscited by 46
- 2021How to avoid machine learning pitfalls: a guide for academic researcherscited by 35
- 2023Generating High-Precision Feedback for Programming Syntax Errors using Large Language Modelscited by 34
- 2023LLMs for Science: Usage for Code Generation and Data Analysiscited by 34
- 2022Repairing Bugs in Python Assignments Using Large Language Modelscited by 28
- 2024Evaluating the Effectiveness of LLMs in Introductory Computer Science Education: A Semester-Long Field Studycited by 26
- 2023A Meta-Summary of Challenges in Building Products with ML Components -- Collecting Experiences from 4758+ Practitionerscited by 22
- 2016Automated Clustering and Program Repair for Introductory Programming Assignmentscited by 21
- 2024Desirable Characteristics for AI Teaching Assistants in Programming Educationcited by 17
- 2023What Should Data Science Education Do with Large Language Models?cited by 13
- 2024LLM-itation is the Sincerest Form of Data: Generating Synthetic Buggy Code Submissions for Computing Educationcited by 7
Built on by
Citing papers per year: 2026: 2.
2 papers.