Date
Publisher
arXiv
Frontier Large language models (LLMs) like ChatGPT and Gemini can decipher
cryptic compiler errors for novice programmers, but their computational scale,
cost, and tendency to over-assist make them problematic for widespread
pedagogical adoption. This work demonstrates that smaller, specialised language
models, enhanced via Supervised Fine-Tuning (SFT), present a more viable
alternative for educational tools. We utilise a new dataset of 40,000 C
compiler error explanations, derived from real introductory programming (CS1/2)
student-generated programming errors, which we used to fine-tune three
open-source models: Qwen3-4B, Llama-3.1-8B, and Qwen3-32B. We performed a dual
evaluation, combining expert human reviews with a large-scale automated
analysis of 8,000 responses using a validated LLM-as-judge ensemble. Our
results show that SFT significantly boosts the pedagogical quality of smaller
models, achieving performance comparable to much larger models. We analyse the
trade-offs between model size and quality, confirming that fine-tuning compact,
efficient models on high-quality, domain-specific data is a potent strategy for
creating specialised models to drive educational tools. We provide a replicable
methodology to foster broader access to generative AI capabilities in
educational contexts.
Study at a glance
- Question: Can smaller, customized AI models explain coding errors to students as well as large commercial models?
- Setting and data: 40,000 compiler error explanations based on errors from introductory programming (CS1/2) students.
- Method: Evaluates AI models using expert human reviews and automated scoring of 8,000 responses (LLM-as-judge ensemble).
Why it matters
Frontier language models can decipher cryptic compiler errors for novice programmers. However, their computational scale, cost, and tendency to over-assist make them problematic for widespread pedagogical adoption.
Key findings
- In introductory college programming, smaller AI models matched the instructional quality of much larger models when explaining student coding errors.
- Tailoring smaller AI models with subject-specific data significantly boosted their educational quality without requiring excessive computing power.
- Major commercial AI models decipher coding errors effectively for beginners, but they tend to over-assist learners and carry high operating costs.
Summary drafted with AI from the paper’s abstract and may contain errors. See the full paper for details.
What is the application?
Who is the user?
Who age?
Why use AI?
Study design
