Monday, November 30, 2026
Science
No Result
View All Result
  • Login
  • HOME
  • SCIENCE NEWS
  • CONTACT US
  • HOME
  • SCIENCE NEWS
  • CONTACT US
No Result
View All Result
Scienmag
No Result
View All Result
Home Science News

Automated AI System Generates Low-Cost Code Comprehension Questions for University Programming Students

November 18, 2026
in Science News
Cora Reilly
By Cora Reilly Scienmag Editorial Profile - Science Education
Reading Time: 6 mins read
0
Automated AI System Generates Low-Cost Code Comprehension Questions for University Programming Students

Automated AI System Generates Low-Cost Code Comprehension Questions for University Programming Students

65
SHARES
587
VIEWS
Share on FacebookShare on Twitter
ADVERTISEMENT

In an empirical study investigating automated pedagogical support in computer science, researchers have demonstrated that generative artificial intelligence can dynamically produce personalized multiple-choice code comprehension questions at institutional scale and negligible operational cost. Published in Human-Centric Intelligent Systems by Martin Goodfellow, Alasdair Lambert, Robbie Booth, and Andrew Fagan, the investigation evaluated an automated pipeline deployed within a foundational university Java programming module enrolling 239 students. Utilizing OpenAI’s GPT-4o mini model integrated directly into an online learning platform, 134 participating students generated a cumulative total of 4,704 bespoke comprehension questions based on their submitted source code. Operating at an average financial expense of approximately $0.0002 per four-question set, the entire semester-long classroom deployment incurred a total computational expenditure of just fifty cents ($0.50). Furthermore, only 57 generated questions—representing approximately 1.2 percent of the overall question volume—were flagged by learners as potentially flawed, with formal analysis confirming that only a single flagged item was entirely incorrect.

The research addresses a persistent structural challenge within computer science education, where introductory learners routinely produce syntactically valid code that passes automated grading tests without achieving a robust conceptual comprehension of the underlying logic. Citing foundational observations by Lehtinen and colleagues, the authors note that approximately one-third of students in a typical introductory cohort of 125 learners experience pronounced difficulties when asked to explain their own solutions. Such gaps frequently emerge when novices repeatedly tweak failing code snippets until unit tests pass by coincidence or rely heavily on modern assistive tools like GitHub Copilot without internalizing essential mechanics. While targeted individual questioning by instructors has traditionally served as the most effective countermeasure for diagnosing misconceptions and deterring plagiarism, conducting bespoke oral interviews remains practically impossible in large lecture classes exceeding 200 students. Moreover, prior behavioral literature highlighted by the authors indicates that face-to-face code reviews often induce substantial anxiety, defensiveness, and embarrassment among struggling novices.

Prior pedagogical attempts to automate comprehension exercises have largely relied on static question banks or rule-based templates, both of which suffer from severe practical and instructional constraints. Template-driven multiple-choice generators, gap-fill systems, and platforms such as Jask have previously sought to personalize assessment by inserting a learner’s specific function and variable identifiers into preconstructed question shells. However, as the authors observe, these formulaic frameworks fail when students submit unconventional or fundamentally flawed architectures, such as executing logic entirely within a main routine rather than modular functions. Furthermore, static item banks are vulnerable to answer sharing among cohorts and demand substantial administrative effort to curate sufficiently large repositories. Emerging natural language processing techniques have attempted to synthesize grammatical prompts, while specialized generative tools like PuzzleMakerPy have explored automated Parsons problem sequencing and plain-English code explanations. The researchers synthesized these varied methodologies to establish an integrated system capable of coupling automated unit testing with adaptive, model-driven multiple-choice generation.

To realize this workflow, the investigators engineered a dedicated web application that interfaces directly with OpenAI’s GPT-4o mini application programming interface running on default parameters. The system was integrated into the Moodle virtual learning environment utilizing the CodeRunner assessment plugin, which manages code execution against predefined test cases across diverse programming languages. Under the established workflow, students initially complete a standard programming assignment, designated as Question 1, by submitting source code to satisfy automated test suites. Upon progressing to Question 2, the application automatically dispatches the student’s submitted code, the assignment description, targeted conceptual topics, and any supplied skeleton templates as structured JSON data to the model. The prompt instructs the assistant to analyze beginner code and generate rigorous multiple-choice items accompanied by plausible distractor options to evaluate authentic understanding. A centralized database concurrently logs student code, generated prompts, answer keys, learner submissions, and specific flags indicating whether students perceived an item as incorrect or unrelated to programming.

The authors demonstrated the contextual responsiveness of the architecture across several representative programming scenarios utilized within their introductory Java syllabus. In an advanced exercise evaluating class inheritance and method overriding, students were instructed to implement a Flat class inheriting from a base Building specification, incorporating a specific seventy-five pound deduction within a modified getTax method. Conversely, when a student inadvertently omitted the super keyword while invoking the parent getTax method—thereby triggering an unintentional infinite recursion—the system generated comprehension items specifically highlighting the recursive loop flaw. In a separate exercise requiring learners to declare an engineSize field and accompanying accessor within a Car class, the generated questions identified and interrogated the student’s unprompted implementation of the this keyword. Although irrelevant outputs were rare, occasional non-technical items emerged, such as asking students to explain municipal rationale for flat-rate tax deductions.

Before conducting an expansive classroom deployment, the research team executed a preliminary pilot study involving six student volunteers selected from second- and third-year undergraduate cohorts. Second-year participants were intentionally recruited due to their recent successful completion of the foundational programming course. Each volunteer was tasked with completing three distinct exercises representing progressive difficulty levels: an introductory problem focusing on primitive types, constructors, and accessor methods; an intermediate task involving conditional branching and for-loops; and an advanced challenge centered on inheritance and overriding. Each submitted solution triggered the generation of four multiple-choice questions containing four answer options. Systematic evaluation of the resulting 72 generated items revealed that only one single question contained a factual inaccuracy. Survey evaluations adapted from prior literature demonstrated that 83 percent of participants (five out of six) responded positively to the exercise format, though individual qualitative feedback noted that simpler exercises yielded overly straightforward questions and suggested that model-generated distractor options could benefit from further refinement.

Encouraged by the preliminary feasibility and cost metrics, the researchers expanded the intervention to their full introductory Java cohort comprising 239 enrolled students. The system was embedded across five weekly practical exercises structured as Moodle quizzes, covering topics spanning methods, fields, terminal printing, conditional logic, loops, iterators, arrays, ArrayList collections, and functional stream processing. To comply with institutional ethical approval, students were required to grant explicit consent for their code to be processed by OpenAI’s commercial API; individuals who opted out received standard programming exercises and retained access to teaching assistant support during scheduled laboratory sessions. The authors attributed this participation drop to escalating end-of-term assessment pressures. Class test performance showed modest average mark improvements of 3 percent and 4 percent compared to the prior academic year, which the researchers characterized as negligible.

Quality assurance and error tracking formed a critical dimension of the full-scale empirical deployment, particularly given the known propensity of generative models to produce hallucinations. To mitigate risks, each quiz interface featured a mandatory disclaimer notifying learners of potential automated inaccuracies and providing a dedicated option reading: “This question doesn’t seem right?” Across all 4,704 generated questions, students invoked this reporting mechanism 57 times, representing an overall query flag rate of 1.2 percent. Subsequent manual review confirmed that only one flagged question was entirely factually incorrect. In the remaining 56 instances, student confusion typically stemmed from stylistic factors, including ambiguous phrasing, references to advanced data structures or alternative algorithms not yet taught, or inquiries concerning unstated problem constraints. Cross-model consensus evaluations conducted with independent large language models corroborated that the overwhelming majority of unflagged questions maintained conceptual accuracy, while underscoring that novice programmers cannot reliably identify subtle automated errors without structured instructional oversight.

At the conclusion of the academic term, participating students were invited to complete an updated evaluation survey comprising quantitative Likert-scale questions and open-ended qualitative prompts. Among the 16 students who completed the survey from 22 respondents, 81 percent (13 participants) agreed that the generated questions actively improved their understanding of their own code. Furthermore, 94 percent (15 participants) affirmed that the items adequately assessed their programming comprehension, 88 percent (14 participants) deemed them coherent, and 100 percent affirmed their direct relevance to submitted code. However, a lower proportion of 63 percent (11 participants) felt the questions helped uncover specific personal misunderstandings, reflecting the tool’s role as a comprehension probe rather than an explanatory diagnostic engine. A lightweight thematic analysis utilizing the Braun and Clarke framework revealed overwhelmingly positive student sentiment, with respondents noting that questions helped clarify critical distinctions—such as the operational differences between reference equality and value equivalence in Java—while cautioning that occasional generation delays and awkward phrasing slightly impeded usability.

The researchers emphasize several operational limitations that currently restrict the tool to low-stakes formative evaluation and early instructional intervention rather than summative grading. Given that only 16 students completed the final survey out of 134 active users, the self-reported findings carry an acknowledged risk of positive selection bias from highly engaged learners. Additionally, the system’s reliance on commercial models trained predominantly on widespread languages limits its immediate applicability to niche or proprietary programming environments, where hallucinations may proliferate on complex codebases. Moving forward, the authors outline plans to investigate open-source, self-hosted language models to eliminate student privacy concerns and eliminate data sharing with third-party vendors. Future research trajectories also include optimizing model temperature parameters to prevent repetitive questions, integrating conceptual topic tagging to direct struggling students toward targeted instructional resources, and executing multi-year longitudinal studies to determine whether automated comprehension questioning in introductory classes yields measurable improvements in advanced software engineering performance.

Subject of Research: Generative artificial intelligence for automated code comprehension assessment in introductory programming

Article Title: From Code to Questions: Leveraging Generative AI to Support Code Comprehension in Introductory Programming

Article References: Goodfellow, M., Lambert, A., Booth, R., & Fagan, A. (2026). From Code to Questions: Leveraging Generative AI to Support Code Comprehension in Introductory Programming. Human-Centric Intelligent Systems, 6(3), 367-376. https://doi.org/10.1007/s44230-026-00150-9

Image Credits: AI Generated

DOI: 10.1007/s44230-026-00150-9

Keywords: code comprehension, introductory programming, generative artificial intelligence, GPT-4o mini, multiple-choice questions, automated assessment, CodeRunner, Moodle VLE, computer science education, formative assessment, Java programming, educational technology, unit testing, student misconceptions, pedagogical scaffolding, plagiarism deterrence, thematic analysis

Cite Scienmag News

Cora Reilly. (November 18, 2026). Automated AI System Generates Low-Cost Code Comprehension Questions for University Programming Students. Scienmag. https://scienmag.com/automated-ai-system-generates-low-cost-code-comprehension-questions-for-university-programming-students/

Cora Reilly. "Automated AI System Generates Low-Cost Code Comprehension Questions for University Programming Students." Scienmag, 18 November 2026, https://scienmag.com/automated-ai-system-generates-low-cost-code-comprehension-questions-for-university-programming-students/. Accessed 30 November 2026.

Cora Reilly. "Automated AI System Generates Low-Cost Code Comprehension Questions for University Programming Students." Scienmag. November 18, 2026. https://scienmag.com/automated-ai-system-generates-low-cost-code-comprehension-questions-for-university-programming-students/

Tags: automated assessmentcode comprehensionCodeRunnercomputer science educationeducational technologyformative assessmentgenerative artificial intelligenceGPT-4o-miniintroductory programmingJava programmingMoodle VLEmultiple-choice questionsPedagogical Scaffoldingplagiarism deterrencestudent misconceptionsthematic analysisunit testing
Share26Tweet16
Previous Post

One-Year CT Changes Quantified by AI Predict Idiopathic Pulmonary Fibrosis Outcomes

Next Post

Multimodal Federated Framework Detects and Classifies IoT Malware Across Diverse Architectures

Related Posts

Robot-assisted radical cystectomy linked to lower blood product use in German study
Medicine

Robot-assisted radical cystectomy linked to lower blood product use in German study

November 30, 2026
Combined Early Risks, Early Smoking, and Unhealthy Habits Double Adult Asthma Risk
Medicine

Combined Early Risks, Early Smoking, and Unhealthy Habits Double Adult Asthma Risk

November 30, 2026
Machine Learning Framework Decodes Diverse Human PARP1 Inhibitors and Activity Cliffs
Chemistry

Machine Learning Framework Decodes Diverse Human PARP1 Inhibitors and Activity Cliffs

November 30, 2026
Stretchable Electronic Skin Upcycled from Mealworm Exoskeletons Controls Quadruped Robot
Science News

Stretchable Electronic Skin Upcycled from Mealworm Exoskeletons Controls Quadruped Robot

November 30, 2026
Genomic Analysis Links Brazilian HTLV-1 Japanese Subgroup to Twentieth-Century Migration Movements
Science News

Genomic Analysis Links Brazilian HTLV-1 Japanese Subgroup to Twentieth-Century Migration Movements

November 30, 2026
Albumin-Bilirubin Score Predicts Postoperative Survival in Oral Squamous Cell Carcinoma
Medicine

Albumin-Bilirubin Score Predicts Postoperative Survival in Oral Squamous Cell Carcinoma

November 30, 2026
Next Post
Multimodal Federated Framework Detects and Classifies IoT Malware Across Diverse Architectures

Multimodal Federated Framework Detects and Classifies IoT Malware Across Diverse Architectures

  • Mothers who receive childcare support from maternal grandparents show more optimized

    Mothers who receive childcare support from maternal grandparents show more parental warmth, finds NTU Singapore study

    27657 shares
    Share 11059 Tweet 6912
  • University of Seville Breaks 120-Year-Old Mystery, Revises a Key Einstein Concept

    1061 shares
    Share 424 Tweet 265
  • Bee body mass, pathogens and local climate influence heat tolerance

    682 shares
    Share 273 Tweet 171
  • Researchers record first-ever images and data of a shark experiencing a boat strike

    546 shares
    Share 218 Tweet 137
  • Groundbreaking Clinical Trial Reveals Lubiprostone Enhances Kidney Function

    531 shares
    Share 212 Tweet 133
Science

Embark on a thrilling journey of discovery with Scienmag.com—your ultimate source for cutting-edge breakthroughs. Immerse yourself in a world where curiosity knows no limits and tomorrow’s possibilities become today’s reality!

RECENT NEWS

  • Robot-assisted radical cystectomy linked to lower blood product use in German study
  • Combined Early Risks, Early Smoking, and Unhealthy Habits Double Adult Asthma Risk
  • Machine Learning Framework Decodes Diverse Human PARP1 Inhibitors and Activity Cliffs
  • Stretchable Electronic Skin Upcycled from Mealworm Exoskeletons Controls Quadruped Robot

Categories

  • Agriculture
  • Anthropology
  • Archaeology
  • Athmospheric
  • Biology
  • Biotechnology
  • Blog
  • Bussines
  • Cancer
  • Chemistry
  • Climate
  • Earth Science
  • Editorial Policy
  • Marine
  • Mathematics
  • Medicine
  • Pediatry
  • Policy
  • Psychology & Psychiatry
  • Science Education
  • Science News
  • Social Science
  • Space
  • Technology and Engineering

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 5,151 other subscribers

© 2026 Scienmag - Science Magazine

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • HOME
  • SCIENCE NEWS
  • CONTACT US

© 2026 Scienmag - Science Magazine

Discover more from Science

Subscribe now to keep reading and get access to the full archive.

Continue reading