Idea · Jul 9, 2026

LLM-Scaffolded Code Self-Explanation for Reducing Resubmission Cycles in CS1

Before a student resubmits a failed CS1 assignment, require them to explain their own code to an LLM and reconcile the LLM's expert explanation -- then measure whether this self-explanation gate reduces resubmission cycles and error recurrence compared to direct resubmission.

What it would do

Tran et al. (ITiCSE 2025) showed that LLM-scaffolded self-explanation in a flipped computer organization course improved perceived learning, with non-native English speakers reporting ~15% higher comfort when an LLM guided them through identifying gaps in their own explanations versus comparing with a fixed expert explanation. The paper's A/B design (fixed-prompt condition vs. interactive-dialogue condition) provides a clean methodological template. This project applies that self-explanation scaffolding specifically to the CS1 code-resubmission moment -- the highest-leverage intervention point in a course that uses Jolly Feedback (Pisan's autograder/feedback system). When a student's submission fails, instead of allowing immediate resubmission, the system presents a self-explanation gate: the student types a plain-English explanation of what their code does and why they believe it should work. An LLM then asks two to three follow-up Socratic questions targeting the likely misconception (inferred from the failing test category), the student responds, and the LLM produces a brief 'reconciliation summary' showing what the student's explanation implies about their code versus what the failing tests reveal. Only after completing the gate is the resubmission button enabled. Phase 1 (computational, no human subjects): Mine existing Jolly Feedback submission logs to build a misconception taxonomy for each assignment in CS1 -- which test failures cluster together, and what code-level error pattern each cluster corresponds to. This phase replicates and extends Tran et al.'s finding that LLMs can accurately scaffold self-explanations, but on code rather than hardware concepts. Phase 2 (system build): Implement the self-explanation gate as a Jolly Feedback plugin. The gate uses Claude to generate follow-up questions conditioned on (failing test IDs, student code diff, misconception category from Phase 1). Phase 3 (quasi-experimental, requires IRB): Deploy in one CSS 142 section with self-explanation gate vs. one section with direct resubmission. Measure resubmission cycles per student, pass rate on first-post-gate submission, and longitudinal error recurrence on later assignments. The research contributes: (a) a CS1 misconception taxonomy derived from Jolly Feedback logs, (b) an LLM Socratic questioning protocol for code self-explanation, and (c) causal evidence on whether self-explanation gates reduce resubmission churn.

More in Assessment & Grading

In-Class Snapshot Profiling for LLM-Personalized Practice in CS Courses

A classroom study that replicates and extends automated student-profile detection from in-class code snapshots to an undergraduate CS2 context, then tests whether LLM-generated personalized exercises derived from each student's snapshot trajectory improve exam outcomes relative to generic practice materials.

Assessment & GradingResearch directionResearchJul 13, 2026

All 132 ideas in Assessment & Grading →