Skip to content

EduGuard: A Safe RAG-Based LLM Tutor for Programming Education

Jul 2026 · arXiv.org · Vol abs/2607.15738 · 0 citations · 35 references
Computer Science

TL;DR

E EduGuard, a safe retrieval-augmented generation (RAG) tutoring framework for introductory programming, is presented and compared against strong baselines, suggesting safe GenAI tutoring requires not only retrieval or strong prompting, but explicit pedagogical control, evidence verification, and deployment safeguards.

Abstract

Generative AI (GenAI) is increasingly used by students for programming explanation, debugging, and assignment support. Yet unrestricted large language model (LLM) tutors can hallucinate, contradict course policy, reveal complete solutions, and foster passive dependence. This paper presents EduGuard, a safe retrieval-augmented generation (RAG) tutoring framework for introductory programming. EduGuard integrates query understanding, instructor-approved course retrieval, pedagogical strategy selection, rubric-aware generation, claim-level verification, and overreliance control. To make evaluation provenance explicit, we construct BILearn-CS, a 600-query instructor-authored, TA-validated benchmark spanning concept questions, debugging cases, misconceptions, assignment-support requests, code-mixed Bangla-English queries, and adversarial direct-answer prompts. Moving beyond a synthetic-only benchmark, we further evaluate on a 150-query public CS50-style course-forum set and run a small controlled pilot with 10 undergraduates using a counterbalanced pre-test/post-test design. Using Meta-Llama-3.1-8B-Instruct as the primary generator, hybrid FAISS/BM25 retrieval, and DeBERTa-v3-large-MNLI as an architecturally separate verifier, EduGuard is compared against strong baselines: GPT-4o-mini Tutor, Llama Socratic Tutor, LPITutor-style RAG, RAG with rubric prompting, and RAG with same-model self-checking. On BILearn-CS, EduGuard attains the best correctness (90.1%), grounding (89.4%), and rubric alignment (90.8%), with the lowest hallucination (4.9%) and direct-answer leakage (9.8%). In the pilot, it raises immediate post-test accuracy from 68.4% to 81.2% and cuts overreliance from 38.0% to 17.0% relative to GPT-4o-mini Tutor. These results suggest safe GenAI tutoring requires not only retrieval or strong prompting, but explicit pedagogical control, evidence verification, and deployment safeguards.

View source

Similar papers

Preprint Jul 2026

CSTutorBench: Benchmarking Small Language Models as Tutors for Block-Based Programming

CSTutorBench is introduced, a benchmark for evaluating language models as CS tutors in VEX VR, a block-based robotics environment, and preliminary findings reveal that models perform well on surface-level criteria such as vocabulary and tone but struggle with deeper pedagogical behaviors.

H. Chad Lane, Bryson Kageler · 0 citations
Conference Jul 2026

Designing Reliable LLM Systems for AI-Assisted Engineering Education

Large Language Models (LLMs) are increasingly used in AI-assisted engineering education, enterprise learning, technical knowledge support, and software-development workflows. However, static retrieval-augmented generation (RAG) pipelines retrieve external context for every query, which can increase latency, token cost,...

Ramesh Venkatachalapathy · 0 citations
Preprint Aug 2026

EduClaw-Bench: A Long-Horizon Benchmark for Pedagogical LLM Agents with Simulated Learners

EduClaw-Bench is introduced, a benchmark that places an agent tutor in a continuous 30-day relationship with a simulated learner grounded in knowledge tracing (KT), whose knowledge-concept mastery, from a KT model trained on real-student data, drives its answers and is probed for learning gain across 55 scenarios.

Unggi Lee, Sookbun Lee, Yeil Jeong et al. · 0 citations
Preprint Aug 2026

Auditable Release Control for Pedagogical Leakage in LLM Tutors

These results establish an auditable release boundary and failure attribution under declared contracts, not universal semantic safety or learning gains, not universal semantic safety or learning gains.

Nizam Kadir · 0 citations
Open access Aug 2026

Lightweight Llama Models with Experts’ Curated RAG for Electrical Engineering Education: An Exploratory Comparison

The results show that the proposed RAG agent substantially improves the lightweight base model and produces transparent, syllabus-grounded answers that experts rated as correct and concise, while GPT-4.5 retains an edge on longer, multistep, and topology-intensive tasks.

André Rocha, Paulo C. Oliveira, João Ferreira et al. · 1 citation
Book Open access Jul 2026

A Good Rubber Duck Does Not Quack: Designing Socratic Scaffolding in AI Tutors

Socratic AI, a VS Code-integrated tutor that addresses this through pedagogically-grounded Socratic dialogue constrained to withhold direct solutions is presented, and evidence that stateful tracking enables adaptive Socratic dialogue that scaffolds productive struggle rather than short-circuiting learning is contribut...

Ayush Thonge, Aalok Thakkar · 0 citations

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