Skip to main content
QUICK REVIEW

[Paper Review] Generative AI for Programming Education: Benchmarking ChatGPT, GPT-4, and Human Tutors

Tung Phung, Victor-Alexandru Pădurean|arXiv (Cornell University)|Jun 29, 2023
Online Learning and AnalyticsComputer Science14 citations
TL;DR

GPT-4 drastically outperforms GPT-3.5 ChatGPT and approaches human tutors in several programming-education scenarios, but still lags in tasks like grading feedback and task synthesis.

ABSTRACT

Generative AI and large language models hold great promise in enhancing computing education by powering next-generation educational technologies for introductory programming. Recent works have studied these models for different scenarios relevant to programming education; however, these works are limited for several reasons, as they typically consider already outdated models or only specific scenario(s). Consequently, there is a lack of a 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. We evaluate using five introductory Python programming problems and real-world buggy programs from an online platform, and assess performance using expert-based annotations. Our results show that GPT-4 drastically outperforms ChatGPT (based on GPT-3.5) and comes close to human tutors' performance for several scenarios. These results also highlight settings where GPT-4 still struggles, providing exciting future directions on developing techniques to improve the performance of these models.

Motivation & Objective

  • Evaluate state-of-the-art LLMs (ChatGPT and GPT-4) for introductory programming education across diverse roles (tutor, assistant, peer).
  • Compare LLM performance to human tutors using expert-based annotations on realistic buggy programs.
  • Identify scenarios where GPT-4 excels and where it still struggles to inform future improvements.

Proposed method

  • Define six programming-education scenarios: program repair, hint generation, grading feedback, pair programming, contextualized explanation, and task synthesis.
  • Use five introductory Python problems with real-world buggy programs from geeksforgeeks.org, covering diverse bugs.
  • Interact with ChatGPT (GPT-3.5) and GPT-4 via web platforms to generate outputs; use two human tutors for comparison.
  • Evaluate outputs with expert-based annotations (two evaluators) across 25 instance per scenario (5 problems × 5 buggy programs).
  • Report scenario-specific metrics (binary correctness, edit distance, etc.) and aggregate results with means and standard errors.

Experimental results

Research questions

  • RQ1How do ChatGPT (GPT-3.5) and GPT-4 perform relative to human tutors across six programming-education scenarios?
  • RQ2What are the strengths and weaknesses of GPT-4 compared to GPT-3.5 and human tutors in program repair, hints, grading, pair programming, contextualized explanations, and task synthesis?
  • RQ3To what extent do LLMs solve the five benchmark problems and how close are they to expert tutor performance?

Key findings

  • GPT-4 substantially outperforms GPT-3.5 in most scenarios and approaches human tutors in several settings.
  • GPT-4 solves all five benchmark problems, while ChatGPT solves four (Fibonacci remains challenging for ChatGPT).
  • In program repair, GPT-4 nears Tutor on the Correct metric (88.0 vs 100.0) but performs more edits (EditTokens 36.6 vs 19.0 for Tutor).
  • In hint generation, GPT-4 improves over ChatGPT yet lags behind Tutor, with Overall scores around 66.0 vs 92.0 for Tutor.
  • In grading feedback, GPT-4 closes some gap with Tutor but shows larger differences on edge-case grading (D-CorrectEdge) and overall accuracy.
  • In pair programming, GPT-4 substantially improves over ChatGPT but still trails Tutor on Overall and ContextKept metrics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.