Workshop Paper
Machine Learning

Generative AI for Programming Education

Tung Phung, Victor-Alexandru Pădurean, J. Cambronero, Sumit Gulwani, Tobias Kohn, R. Majumdar, A. Singla, G. Soares
June 29, 2023International Computing Education Research Workshop173 citations

173

Citations

10

Influential Citations

International Computing Education Research Workshop

Venue

2023

Year

Abstract

Generative AI and large language models hold great promise in enhancing computing education by powering next-generation educational technologies. State-of-the-art models like OpenAI’s ChatGPT [8] and GPT-4 [9] could enhance programming education in various roles, e.g., by acting as a personalized digital tutor for a student, a digital assistant for an educator, and a digital peer for collaborative learning [1, 2, 7]. In our work, we seek to comprehensively evaluate and benchmark state-of-the-art large language models for various scenarios in programming education. Recent works have evaluated several large language models in the context of programming education [4, 6, 10, 11, 12]. However, these works are limited for several reasons: they have typically focused on evaluating a specific model for a specific education scenario (e.g., generating explanations), or have considered models that are already outdated (e.g., OpenAI’s Codex [3] is no longer publicly available since March 2023). Consequently, there is a lack of systematic study that benchmarks state-of-the-art models for a comprehensive set of programming education scenarios. In our work, we systematically evaluate two models, ChatGPT (based on GPT-3.5) and GPT-4, and compare their performance with human tutors for a variety of scenarios in programming education. These scenarios are designed to capture distinct roles these models could play, namely digital tutors, assistants, and peers, as discussed above. More concretely, we consider the following six scenarios: (1) program repair, i.e., fixing a student’s buggy program; (2) hint generation, i.e., providing a natural language hint to the student to help resolve current issues; (3) grading feedback, i.e., grading a student’s program w.r.t. a given rubric; (4) peer programming, i.e., completing a partially written program or generating a sketch for the solution program; (5) task creation, i.e., generating new tasks that exercise specific types of concepts or bugs; (6) contextualized explanation, i.e., explaining specific concepts or functions in the context of a given program. Our study uses a mix of quantitative and qualitative evaluation to compare the performance of these models with the performance of human tutors. We conduct our evaluation based on 5 introductory Python programming problems with a diverse set of input/output specifications. For each of these problems, we consider 5 buggy programs based on publicly accessible submissions from geeksforgeeks.org [5] (see Figure 1); these buggy programs are picked to capture different types of bugs for each problem. We will provide a detailed analysis of the data and results in a longer version of this poster. Our preliminary results show that GPT-4 drastically outperforms ChatGPT (based on GPT-3.5) and comes close to human tutors’ performance for several scenarios.

Analysis

Why This Paper Matters

Generative AI and large language models (LLMs) are rapidly transforming computing education, offering the potential to provide personalized tutoring, automated feedback, and collaborative learning support at scale. However, as the authors note, prior evaluations of LLMs in programming education have been fragmented—often focusing on a single model, a narrow scenario, or outdated models like OpenAI's Codex, which was deprecated in March 2023. This lack of systematic benchmarking makes it difficult for educators and developers to understand which models are best suited for specific educational roles and how they compare to human tutors.

This paper addresses that gap by comprehensively evaluating two state-of-the-art models, ChatGPT (based on GPT-3.5) and GPT-4, across six distinct scenarios that capture the roles of digital tutor, assistant, and peer. By comparing model performance directly with human tutors, the study provides a crucial reality check: how close are LLMs to human-level support in programming education? The preliminary findings—that GPT-4 drastically outperforms GPT-3.5 and approaches human tutor performance in several scenarios—are significant for anyone building or deploying AI educational tools. They suggest that the latest generation of LLMs may be sufficiently capable to augment human instruction in meaningful ways, while also highlighting areas where human expertise remains superior.

Technical Contributions

  • Comprehensive scenario coverage: The study evaluates six programming education scenarios: program repair, hint generation, grading feedback, peer programming, task creation, and contextualized explanation. These scenarios are designed to reflect the distinct roles LLMs could play (tutor, assistant, peer).
  • Benchmark dataset: The authors construct a benchmark using 5 introductory Python programming problems, each with 5 buggy programs selected from publicly accessible GeeksforGeeks submissions to capture diverse bug types.
  • Mixed-methods evaluation: The evaluation combines quantitative and qualitative comparisons between LLMs and human tutors, providing a richer understanding of model strengths and weaknesses.
  • Model comparison: The study directly compares ChatGPT (GPT-3.5) and GPT-4, offering insights into the rapid improvement of LLM capabilities within a short timeframe.

Results

The abstract reports preliminary results indicating that GPT-4 drastically outperforms ChatGPT (GPT-3.5) and comes close to human tutors' performance for several scenarios. However, specific quantitative metrics (e.g., accuracy, win rates, or qualitative ratings) are not provided in the abstract; the authors state that detailed analysis will appear in a longer version of the poster. Consequently, while the directional finding is clear—GPT-4 is a substantial leap over GPT-3.5 and narrows the gap with humans—the exact magnitude of improvement and the scenarios where GPT-4 excels or lags remain unspecified in this summary.

Significance

This work is significant for the AI and computing education communities because it establishes a systematic, multi-scenario benchmark for evaluating LLMs in programming education. By comparing models to human tutors, it provides a realistic assessment of where LLMs can add value and where they fall short. The finding that GPT-4 approaches human tutor performance in several scenarios suggests that LLMs are becoming viable tools for scaling personalized programming education. Moreover, the benchmark and methodology can guide future research in developing more capable and reliable educational AI systems, and inform educators about the strengths and limitations of current models. As LLMs continue to evolve, such systematic evaluations will be essential for ensuring that AI-powered educational technologies are both effective and aligned with pedagogical goals.