Improving LLM Classification of Logical Errors by Integrating Error Relationship into Prompts

Yanggyu Lee, Suchae Jeong, Jihie Kim
4/30/2024
cs.AIcs.PL

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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.

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{lee2024improving,
  title  = {Improving LLM Classification of Logical Errors by Integrating Error Relationship into Prompts},
  author = {Yanggyu Lee and Suchae Jeong and Jihie Kim},
  year   = {2024},
  eprint = {2404.19336},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.19336v3}
}

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/2404.19336.svg)](https://codeofpaper.com/paper/2404.19336)

Discussion