Table of Contents
Fetching ...

Stitch: Step-by-step LLM Guided Tutoring for Scratch

Yuan Si, Kyle Qi, Daming Li, Hanyuan Shi, Jialu Zhang

TL;DR

Stitch targets semantic bugs in Scratch by replacing direct repair with step-by-step, diff-driven tutoring guided by a large language model. It combines a Diff-Analyze module that compares student work to a teacher-provided reference with an AST-based normalization and a visual block renderer, and uses LLM-generated, pedagogically grounded explanations to scaffold learners through iterative revisions. The system emphasizes scaffolding and learner agency, delivering concise explanations and optional deeper ChatBot support, rather than handing out ready-made fixes. An empirical study against a state-of-the-art tool shows Stitch significantly improves bug understanding, debugging confidence, and perceived guidance quality, suggesting that step-by-step AI tutoring can achieve teacher-like effectiveness. These findings imply a generalizable framework for AI-assisted feedback in block-based and introductory programming education, balancing automation with active learner engagement.

Abstract

Block-based environments such as Scratch are increasingly popular in programming education. While block syntax reduces surface errors, semantic bugs remain common and challenging for novices to resolve. Existing debugging workflows typically show the correct program directly to learners, a strategy that may fix errors but undermines the development of problem-solving skills. We present Stitch, an interactive tutoring system that replaces "showing the answer" with step-by-step scaffolding. The system's Diff-Analyze module contrasts a student's project with a reference implementation, identifies the most critical differences, and uses a large language model to explain why these changes matter. Learners inspect highlighted blocks through a custom rendering engine, understand the explanations, and selectively apply partial fixes. This iterative process continues until the intended functionality is achieved. We evaluate Stitch in an empirical study, comparing it against a state-of-the-art automated feedback generation tool for Scratch. Our key insight is that simply presenting the correct program is pedagogically ineffective. In contrast, our interactive, step-by-step guided system promotes a more effective learning experience. More broadly, what constitutes effective feedback in block-based programming remains an open question. Our evaluation provides new evidence that step-by-step tutoring significantly enhances learning outcomes, outperforming both direct-answer approaches and current automated feedback generation tools.

Stitch: Step-by-step LLM Guided Tutoring for Scratch

TL;DR

Stitch targets semantic bugs in Scratch by replacing direct repair with step-by-step, diff-driven tutoring guided by a large language model. It combines a Diff-Analyze module that compares student work to a teacher-provided reference with an AST-based normalization and a visual block renderer, and uses LLM-generated, pedagogically grounded explanations to scaffold learners through iterative revisions. The system emphasizes scaffolding and learner agency, delivering concise explanations and optional deeper ChatBot support, rather than handing out ready-made fixes. An empirical study against a state-of-the-art tool shows Stitch significantly improves bug understanding, debugging confidence, and perceived guidance quality, suggesting that step-by-step AI tutoring can achieve teacher-like effectiveness. These findings imply a generalizable framework for AI-assisted feedback in block-based and introductory programming education, balancing automation with active learner engagement.

Abstract

Block-based environments such as Scratch are increasingly popular in programming education. While block syntax reduces surface errors, semantic bugs remain common and challenging for novices to resolve. Existing debugging workflows typically show the correct program directly to learners, a strategy that may fix errors but undermines the development of problem-solving skills. We present Stitch, an interactive tutoring system that replaces "showing the answer" with step-by-step scaffolding. The system's Diff-Analyze module contrasts a student's project with a reference implementation, identifies the most critical differences, and uses a large language model to explain why these changes matter. Learners inspect highlighted blocks through a custom rendering engine, understand the explanations, and selectively apply partial fixes. This iterative process continues until the intended functionality is achieved. We evaluate Stitch in an empirical study, comparing it against a state-of-the-art automated feedback generation tool for Scratch. Our key insight is that simply presenting the correct program is pedagogically ineffective. In contrast, our interactive, step-by-step guided system promotes a more effective learning experience. More broadly, what constitutes effective feedback in block-based programming remains an open question. Our evaluation provides new evidence that step-by-step tutoring significantly enhances learning outcomes, outperforming both direct-answer approaches and current automated feedback generation tools.

Paper Structure

This paper contains 22 sections, 7 figures, 1 table, 1 algorithm.

Figures (7)

  • Figure 1: An example Scratch project of a maze game resnick2009scratch. Source: https://scratch.mit.edu/projects/77278452
  • Figure 2: Stitch pipeline: the system compares student's project and teacher's sample project, identifies differences, generates explanations and block renderings, and guides students iteratively until functional equivalence is achieved.
  • Figure 3: Diff-Analyze Module
  • Figure 4: Prompt for the reasoning module: generate concise, pedagogically grounded explanations of detected discrepancies.
  • Figure 5: Prompt for the ChatBot: produce longer, teacher-like responses that clearly answer student's question.
  • ...and 2 more figures