Improvement of Advisory System Using LLM for Run-Time Errors in C Programming Learning
Akiyoshi Wakatani, Konan University (Japan)
Toshiyuki Maeda, Hannan University (Japan)
Abstract
Generative AI technology based on LLM (Large-scale Language Models) has been applied to various fields, and one of them is an attempt to apply the technology of automatic program generation to programming education. By using OpenAI's API, we developed and evaluated a prototype VTA (Virtual Teaching Assistant) system that takes C language programs with errors and error messages as input to LLM and outputs appropriate advice for beginner-level learners. The results showed that the VTA produced appropriate advice for syntactic and semantic programming errors, but for logical errors, the VTA gave only general explanations in some cases. We focused on floating-point errors among logic errors and found that the main causes were “denominator of division is zero,” “divisor of modulus calculation is zero,” and “result of integer multiplication overflows”. Therefore, for each candidate error factor, appropriate auxiliary information, including line numbers, could be extracted from the program and added to the prompts to generate more appropriate advice and then we confirmed that the effectiveness of the VTA system was improved. Therefore, the advice including the program location is successfully generated by using the auxiliary information extracted from the program, and the information is sufficient for the user's program debugging. However, if the number of error occurrence candidates increases, the advice will include many points of irrelevant locations, which may cause confusion to the user. However, for beginners, the program length is short, and programs of less than 100 lines have at most four potential error locations.
Keywords |
beginners, floating point exception, logical error, python language, self-study |
REFERENCES |
[1] OpenAI. “ChatGPT”, Available: https://chat.openai.com/, 2024.. [2] Gemini, “Gemini”, Available: https://gemini.google.com/app, 2024. [3] Hellas, A., Leinonen, J., Sarsa, S., Koutcheme, C., Kujanpaa, L., & Sorva, J. “Exploring the Responses of Large Language Models to Beginner Programmers’ Help Requests.”, https://arxiv.org/pdf/2306.05715.pdf, 13 pages, 2023. [4] Kazemitabaar, M., Chow, J., Ma, C. K. T., Ericson,B. J., Weintrop, D., & Grossman, T. “Studying the Effect of AI Code Generators on Supporting Novice Learners in Introductory Programming”, The 2023 CHI Conference on Human Factors in Computing Systems. DOI:10.1145/3544548.3580919, 23 pages, 2023. [5] Leinonen, J., Hellas, A., Sarsa, S., Reeves, B., Denny, P., Prather, J., & Becker, B. A. “Using Large Language Models to Enhance Programming Error Messages”, The 54th ACM Technical Symposium on Computer Science Education. DOI: 10.1145/3545945.3569770, pp. 563-569, 2023. [6] Wakatani, A. and Maeda, T. “Prototype advisory system for learning C programming using generative AI”, Proceedings of the 15th International Conference on Education & Educational Psychology, 2024. [7] Aho, A. V. M., Lam, Sethi, S. R., & Ullman, J. D. “Compilers: Principles, Techniques, and Tools (2nd ed.)”, Pearson Education, 2006. |