Skip to content
Open access

LLM-Assisted Grading for Object-Oriented Programming: A C++ Dataset and Evaluation Study

Sep 2026 · Electronics · Vol 15, pp. 4331 · 0 citations · 14 references

TL;DR

A dataset of 271 C++ student solutions to eight OOP examination problems is introduced, together with the problem statements and the reference grades produced by the university auto-grader, indicating that agreement with a reference is an insufficient basis for choosing a local grading model, and that compliance, determinism, degeneracy, and the cost of failed generations must be measured alongside it.

Abstract

Large language models (LLMs) are increasingly used in programming tasks, including code generation, debugging, validation, optimization, test generation, and educational support. Their use as graders of student programming assignments is, however, still not fully understood, especially in object-oriented programming (OOP). In this context, correctness depends not only on the final output of a program but also on class structure, encapsulation, abstraction, and design decisions. This paper introduces a dataset of 271 C++ student solutions to eight OOP examination problems, together with the problem statements and the reference grades produced by the university auto-grader. We evaluate four locally served open-weight models—phi4-mini, gpt-oss:20b, qwen3.6:27b, and qwq:32b—under one endpoint, one prompt, and deterministic decoding, and we report four properties that a deployable grader must have. The first is output-format compliance, which ranges from 88.9% to 98.9% across models: qwq:32b failed to terminate on 30 of 271 submissions even at a doubled generation budget, spending 7.7 MJ, 29.9% of its total energy, to produce nothing. The second is agreement with the reference grades on the 30-point course scale, where qwen3.6:27b performs best (MAE 3.23 points, r=0.85) and phi4-mini worst (MAE 10.90, r=0.17); all four models grade systematically more strictly than the auto-grader. The third is reproducibility, which fails at two levels. Repeating an identical run, three models returned identical grades at temperature 0 with a fixed seed while gpt-oss:20b varied by up to 21 points on the same submission; restricting the serving daemon to one concurrent request makes it reproducible, locating that failure in request batching rather than in sampling. Grading the same submissions as part of a different set, however, no model is reproducible: agreement with the original run ranges from 13 to 33 of 40 submissions, and a control run with the original client excludes our instrumentation as the cause. The fourth is degeneracy: phi4-mini awarded an identical grade of zero to every submission in three of the eight examinations, 109 submissions in total, so its aggregate agreement statistics describe a model that is not grading. On a subset graded blind by two instructors, each instructor agreed with the auto-grader more closely than the two agreed with each other, so the residual error of the best-performing model is of the same order as ordinary disagreement between human graders. We also report a negative result: a declaration-level reference could be reconstructed for only five of the eight examinations, because the auto-grader merges missing declarations and wrong return values into single checks. Together these results indicate that agreement with a reference is an insufficient basis for choosing a local grading model, and that compliance, determinism, degeneracy, and the cost of failed generations must be measured alongside it.

Read PDF

Similar papers

Preprint Aug 2026

Revisiting the Performance of Generative Artificial Intelligence on Introductory Object-Oriented Programming Assessments: Insights from 2026

An updated evaluation of the capabilities and limitations of contemporary GenAI systems on authentic introductory OOP assessments is provided and evidence that can inform the design of programming assessments, the responsible integration of GenAI tools into software engineering education, and future studies evaluating...

M. Lepp, Joosep Kaimre · 0 citations
Conference Open access Sep 2026

A PROTOTYPE SYSTEM FOR LLM-BASED AUTOMATIC GENERATION OF MULTIPLE-CHOICE QUESTIONS IN MACHINE LEARNING PROGRAMMING

In recent years, the importance of mathematical, data science, and AI education has grown significantly, making it necessary to learn machine learning programming. In programming education, while acquiring knowledge through lectures is important, the experience of actually creating programs helps solidify that knowledg...

A. Wakatani, T. Maeda · 0 citations
Review Oct 2026

Correctness, Convergence, and AI-Generated Code Detection: A Longitudinal Study of Student and Large Language Model Code in Introductory Programming

Large language models can generate plausible solutions to programming assignments, making it tempting to detect their use by matching student code against a reference bank of generated solutions. Yet similar code can also arise when an assignment admits only a few natural implementations, which leaves open what a match...

Runlong Ye, Jing Fan, Angela Zavaleta Bernuy et al. · 0 citations
#artificial intelligence Preprint Sep 2026

An Empirical Evaluation of Cost-Efficient Large Language Models on Algorithmic Programming Tasks

This study empirically evaluates whether cost-efficient Large Language Models (LLMs) can be trusted to generate enterprise code to a written specification. Three models (Gemini Flash 3, GPT-5.4 mini and Claude Haiku 4.5) were asked to solve 992 algorithmic problems as Java Spring Boot service methods conforming to a ma...

Chandimal Adikari, Nandika Herath · 0 citations
Open access

Evaluation and Distillation of Source Code Generation Tasks by Large Language Models

Two novel contributions are introduced: CodeEval and CodeQual, an open-source execution framework that provides researchers with a ready-to-use evaluation pipeline for evaluating and improving LLMs in software engineering contexts, encompassing both functional correctness assessment and subjective code quality evaluati...

Danny Brahman · 0 citations
#software testing Preprint Aug 2026

Benchmarking the Titans: A Multi-Dimensional Empirical Evaluation of LLM Code Generation Quality in the .NET Ecosystem

An automated, multi-dimensional evaluation framework for C# code generation, applying it to four state-of-the-art LLMs: GPT, Gemini, Claude, and Grok is presented and a substantial gap between correctness and quality attributes is revealed.

Seyed Mohammad Mahdi Ghalandarian, Majid Bazargani, Masoumeh Taromirad · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.