Large Language Models Show Promise in Generating Helpful Error Explanations for Programmers

Wednesday 05 March 2025


Researchers have been exploring ways to improve the way computers assist programmers in fixing errors, and a recent study has shed light on how large language models can be used to generate helpful explanations for debugging purposes.


When programming, mistakes are inevitable, and understanding the cause of an error is crucial to correcting it. However, traditional compiler or interpreter-generated error messages often leave much to be desired, being unclear, jargon-heavy, or even misleading. This can lead to frustration and confusion, especially for novice programmers.


In this study, scientists used a large language model called GPT-3.5, which is capable of generating human-like text based on input prompts. They tested the model’s ability to provide explanations for programming errors without using the original error message as a guide. The results showed that the model was able to generate useful and accurate explanations in most cases.


The researchers also experimented with different strategies for prompting the model, including providing additional context or examples of desired output. While these approaches didn’t significantly improve the accuracy of the explanations, they did make them shorter and more focused.


One of the key findings was that the model’s responses were often too verbose, containing information that wasn’t relevant to fixing the error. This highlights the importance of fine-tuning the model to produce concise and targeted feedback.


The study also touched on the issue of language models being biased towards mainstream programming languages and professional software development practices, which can make them less effective for novice programmers using pedagogically-oriented languages like TigerJython.


In practice, this means that instructors may need to adapt their teaching methods to better utilize large language models in the classroom. This could involve providing students with examples of what they would like the model to generate as feedback and then using those prompts to test the model’s abilities.


Overall, this research demonstrates the potential of large language models to enhance programming error messages and provide more effective assistance for programmers. However, it also highlights the need for further refinement and adaptation to ensure that these tools are truly beneficial for all users.


Cite this article: “Large Language Models Show Promise in Generating Helpful Error Explanations for Programmers”, The Science Archive, 2025.


Programming, Errors, Large Language Models, Gpt-3.5, Explanations, Debugging, Compiler, Interpreter, Novice Programmers, Programming Languages


Reference: Audrey Salmon, Katie Hammer, Eddie Antonio Santos, Brett A. Becker, “Debugging Without Error Messages: How LLM Prompting Strategy Affects Programming Error Explanation Effectiveness” (2025).


Leave a Reply