Warwick researchers build AI tutor that holds back coding answers
A University of Warwick team trained a small AI model to help learners fix bugs in Python by asking questions. In tests it gave away answers far less often than GPT-4o.
University of Warwick researchers posted a paper on 10 October 2026 about an AI tutor that helps learners fix bugs without giving answers away.
The paper, by Mykhailo Kopytskyi, Jianhua Yang and Mir Seyedebrahimi, describes a tutor called SocraticRepair. A Socratic tutor asks questions that lead the learner to find the problem. The team further trained a small open model, Qwen2.5-Coder-7B-Instruct, on 1213 tutoring dialogues about Python. Other AI models wrote these dialogues from buggy student programs in four programming datasets.
The team compared it with GPT-4o, a general chatbot model, on 53 programming problems it had not seen. According to the full text, SocraticRepair gave away the answer too early in 24 of 1,276 turns (1.88%). GPT-4o did so in 59 of 794 turns (7.43%). Across whole conversations, the figures were 12.6% and 33.3%.
For learners who ask a chatbot for help with code, the paper says general models tend to reveal the solution too early. The Raspberry Pi Foundation makes a similar point in a lesson unit for ages 13 to 16, made with Google DeepMind. The foundation says AI models usually give the answer by default. Its five lessons teach pupils to write prompts that get the tool to guide or challenge them instead.
GPT-4o scored higher on technical correctness. The lesson plans SocraticRepair wrote for itself often had technical errors. The students in the tests were simulated by another AI model, which the authors say may not reflect how real learners would use the tutor. The paper does not say whether the tutor will be released.