Personalized Worked Example Generation from Student Code Submissions using Pattern-based Knowledge Components
Griffin Pitts, Muntasir Hoq, Peter Brusilovsky, Narges Norouzi, Arto Hellas + 2 more
TLDR
A new method generates personalized programming worked examples from student code using pattern-based knowledge components for improved learning.
Key contributions
- Introduces a pipeline for generating personalized worked examples from student code.
- Extracts recurring structural Knowledge Component (KC) patterns via AST-based analysis.
- Uses KC patterns to condition a generative model for educational content generation.
- Expert evaluation shows KC-conditioned generation improves topical focus and relevance to errors.
Why it matters
Fixed example libraries are costly and often irrelevant to student errors. This paper offers a scalable solution by generating personalized content directly from student code. This ensures learning materials directly address individual logical errors, significantly enhancing adaptive programming education.
Original Abstract
Adaptive programming practice often relies on fixed libraries of worked examples and practice problems, which require substantial authoring effort and may not correspond well to the logical errors and partial solutions students produce while writing code. As a result, students may receive learning content that does not directly address the concepts they are working to understand, while instructors must either invest additional effort in expanding content libraries or accept a coarse level of personalization. We present an approach for knowledge-component (KC) guided educational content generation using pattern-based KCs extracted from student code. Given a problem statement and student submissions, our pipeline extracts recurring structural KC patterns from students' code through AST-based analysis and uses them to condition a generative model. In this study, we apply this approach to worked example generation, and compare baseline and KC-conditioned outputs through expert evaluation. Results suggest that KC-conditioned generation improves topical focus and relevance to learners' underlying logical errors, providing evidence that KC-based steering of generative models can support personalized learning at scale.
📬 Weekly AI Paper Digest
Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.