Improving LLM Classification of Logical Errors by Integrating Error Relationship into Prompts
Not on the map. Why?
Abstract (arXiv)
LLMs trained in the understanding of programming syntax are now providing effective assistance to developers and are being used in programming education such as in generation of coding problem examples or providing code explanations. A key aspect of programming education is understanding and dealing with error message. However, 'logical errors' in which the program operates against the programmer's intentions do not receive error messages from the compiler. In this study, building on existing research on programming errors, we first define the types of logical errors that can occur in programming in general. Based on the definition, we propose an effective approach for detecting logical errors with LLMs that makes use of relations among error types in the Chain-of-Thought and Tree-of-Thought prompts. The experimental results indicate that when such logical error descriptions in the prompt are used, the average classifition performance is about 21% higher than the ones without them. We also conducted an experiment for exploiting the relations among errors in generating a new logical error dataset using LLMs. As there is very limited dataset for logical errors such benchmark dataset can be very useful for various programming related applications. We expect that our work can assist novice programmers in identifying the causes of code errors and correct them more effectively.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 9 of its 15 references that are in the map. First posted on arXiv 30 Apr 2024.
Builds on
9 of 15 references.
References · 9
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024Large Language Models: A Surveycited by 506
- 2022Automatic Generation of Programming Exercises and Code Explanations using Large Language Modelscited by 124
- 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 93
- 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
- 2022Using Large Language Models to Enhance Programming Error Messagescited by 67
- 2023Decoding Logic Errors: A Comparative Study on Bug Detection by Students and Large Language Modelscited by 6
Built on by
Citing papers per year: 2025: 5.
5 papers.
- 2025CASTLE: Benchmarking Dataset for Static Code Analyzers and LLMs towards CWE Detectioncited by 10
- 2025Automated Identification of Logical Errors in Programs: Advancing Scalable Analysis of Student Misconceptionscited by 5
- 2025Benchmarking the rationality of AI decision making using the transitivity axiomcited by 1
- 2025McMining: Automated Discovery of Misconceptions in Student Codecited by 1
- 2025Plausibility as Failure: How LLMs and Humans Co-Construct Epistemic Errorcited by 0
- 2025Plausibility as Failure: How LLMs and Humans Co-Construct Epistemic Error18 Dec 2025
- 2025McMining: Automated Discovery of Misconceptions in Student Code9 Oct 2025
- 2025Automated Identification of Logical Errors in Programs: Advancing Scalable Analysis of Student Misconceptions16 May 2025
- 2025CASTLE: Benchmarking Dataset for Static Code Analyzers and LLMs towards CWE Detection12 Mar 2025
- 2025Benchmarking the rationality of AI decision making using the transitivity axiom14 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2024Understanding Defects in Generated Codes by Language Models
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inference
- 2024One Step at a Time: Combining LLMs and Static Analysis to Generate Next-Step Hints for Programming Tasks
- 2026Simulating Students' Java Programming Errors with Large Language Models
- 2025On Code-Induced Reasoning in LLMs
- 2026Improving Mathematical Reasoning Capabilities in Large Language Models via Reasoning Process Error Classification
- 2025Exploring the Potential and Limitations of Large Language Models for Novice Program Fault Localization ↗
- 2024The Impact of Prompt Programming on Function-Level Code Generation