Paper deep dive
Personalized Worked Example Generation from Student Code Submissions using Pattern-based Knowledge Components
Griffin Pitts, Muntasir Hoq, Peter Brusilovsky, Narges Norouzi, Arto Hellas, Juho Leinonen, Bita Akram
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 98%
Last extracted: 6/21/2026, 9:03:41 AM
Summary
This paper presents a method for generating personalized programming 'worked examples' by using pattern-based Knowledge Components (KCs) extracted from student code. The authors use an AST-based analysis pipeline (involving SANN and VAE) to identify recurring structural patterns in student submissions that represent logical errors or conceptual gaps. These KCs are then used to condition a Large Language Model (GPT-5.2) to generate worked examples that explicitly address the specific patterns found in the student's code. Expert evaluation demonstrated that KC-conditioned generation significantly improves the relevance to the student's logical errors and the clarity of novice-friendly explanations compared to a baseline LLM approach.
Entities (10)
Relation Signals (5)
Griffin Pitts â affiliatedwith â North Carolina State University
confidence 100% · Griffin Pitts 0009-0004-3111-6118 North Carolina State University
GPT-5.2 â generates â Worked Example
confidence 100% · we provide GPT-5.2 (gpt-5.2-chat-latest) with (i) the problem statement... to produce a concise KC label
KC â guides â Worked Example Generation
confidence 100% · We present an approach for knowledge-component (KC) guided educational content generation
SANN â extractsfrom â AST
confidence 90% · These subtrees are fed to a Subtree-based Attention Neural Network (SANN)
VAE â learnsrepresentationsfor â KC
confidence 90% · We train a variational autoencoder (VAE) over sequences of high-attention subtrees to learn representations
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
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.
Tags
Links
- Source: https://arxiv.org/abs/2604.24758v1
- Canonical: https://arxiv.org/abs/2604.24758v1
Trouble viewing inline? Open PDF directly â
Full Text
29,277 characters extracted from source content.
Expand or collapse full text
by-nc-nd Personalized Worked Example Generation from Student Code Submissions using Pattern-based Knowledge Components Griffin Pitts 0009-0004-3111-6118 North Carolina State UniversityRaleighNCUSA , Muntasir Hoq 0000-0003-2591-0476 North Carolina State UniversityRaleighNCUSA , Peter Brusilovsky 0000-0002-1902-1464 University of PittsburghPittsburghPAUSA , Narges Norouzi 0000-0001-9861-7540 University of California, BerkeleyBerkeleyCAUSA , Arto Hellas 0000-0001-6502-209X , Juho Leinonen 0000-0001-6829-9449 Aalto UniversityAaltoFinland and Bita Akram 0000-0001-5195-5841 North Carolina State UniversityRaleighNCUSA (2026) 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. Worked example generation, programming education, knowledge components, AST-based code analysis, LLMs, AI in education â journalyear: 2026â copyright: câ conference: Proceedings of the Thirteenth ACM Conference on Learning @ Scale; June 29âJuly 3, 2026; Seoul, Republic of Korea.â booktitle: Proceedings of the Thirteenth ACM Conference on Learning @ Scale (L@S â26), June 29âJuly 3, 2026, Seoul, Republic of Koreaâ isbn: 979-8-4007-2293-6/2026/06â doi: 10.1145/3774398.3811577â ccs: Social and professional topics Computing educationâ ccs: Computing methodologies Natural language processingâ ccs: Computing methodologies Knowledge representation and reasoningâ ccs: Computing methodologies Information extraction 1. Introduction Introductory programming courses often use short learning activities that support studentsâ conceptual understanding through practice and explanation. One common activity type is the worked example, which typically presents students with a related problem statement, a code solution similar to what they are working on, and step-by-step instructional explanations that walk through the solution process (Skudder and Luxton-Reilly, 2014; Muldner et al., 2022). Access to a well-matched worked example at points of struggle can help students interpret errors, connect ideas to code, and keep moving forward (Hoq et al., 2025a). Learning to program can be cognitively demanding, and grounded in cognitive load theory, worked examples can reduce unnecessary load by making intermediate steps explicit and limiting the amount of inference required to follow a solution (Sweller, 1988; Chandler and Sweller, 1991; Muldner et al., 2022). In practice, producing high-quality worked examples at the level of detail needed for instruction is costly and time-intensive. Instructors must craft a correct solution, decide how to segment it into meaningful steps, and write explanations that are accurate, readable, and appropriate for novice programmers (Smit, 2025; Jury et al., 2024). Large repositories can reduce the need to author every example from scratch, however identifying examples that align with the specific task and difficulty a student is experiencing remains challenging (Hoq et al., 2025a). In many cases, a course repository may not contain a worked example with the needed fine-grained relevance, and selecting one that does fit requires targeted retrieval or matching methods (Hoq et al., 2025a). Learnersâ prior knowledge further complicates authoring and selection because explanatory detail that helps novices can become redundant or obstructive for more advanced learners, consistent with the expertise reversal effect (Kalyuga et al., 2003). Large language models (LLMs) offer a way to reduce authoring burden by generating worked examples on demand (Jury et al., 2024; Pitts et al., 2025). Prior evaluations in introductory programming report that expert reviewers judged LLM-generated worked examples to have clear, suitable explanations and coherent step structure, and that students found them helpful for learning and making progress on practice tasks (Jury et al., 2024; Smit, 2025). However, existing approaches often provide limited adaptation to learner differences such as skill level, which can lead to examples that introduce unfamiliar concepts for novices (Smit, 2025). Moreover, they may not align the example with the specific logical error reflected in a studentâs partial solution (Hoq et al., 2025c), so the example may be less direct in addressing the studentâs current misconception. Knowledge components (KCs) represent discrete units of knowledge or skill that support successful task performance (Koedinger et al., 2012). In KC-based learner models, student performance is interpreted in terms of which KCs appear mastered versus still learning, and systems can use that information to select what to practice or explain next. In this work, we operationalize KCs as the concepts that a worked example should conceptually target. Specifically, following prior work (Hoq et al., 2025b), we extract pattern-based KCs from a studentâs submission via identifying common programming patterns in abstract syntax trees (AST) found in a cohort of studentsâ submissions. As these KCs are derived from recurring AST substructures in the learnerâs own code, they ground generation in constructs students are actively using and may be applying incorrectly or incompletely (Hoq et al., 2025b). Using these pattern-based KCs, we then condition an LLM to generate a worked example whose code and explanations explicitly address the intended KC targets found in the studentsâ code. We compare the KC-conditioned approach to an otherwise identical generator that omits KC information, our baseline. Both approaches are evaluated through expert review using a rubric adapted from prior work (Jury et al., 2024) that assesses worked-example quality and relevance to the learnerâs likely knowledge gap. For outputs guided by the pattern-based KCs, we additionally assess whether the intended KCs appear in the example code and are explicitly discussed in the step explanations. Altogether, these evaluations address the following research questions: RQ1: Does KC-conditioned generation improve worked-example quality and relevance compared to our baseline? RQ2: How reliably does our KC-conditioned pipeline produce worked examples that include and explicitly explain the intended KC patterns? 2. Related Work Recent work has used LLMs to generate programming learning activities. Focusing on scaffolded Parsons problems, CodeTailor (Hou et al., 2024) uses a learnerâs incorrect code to prompt an LLM for a corrected reference solution, then constructs a personalized Parsons problem by aligning the learnerâs original code with the generated correction. Similarly, PuzzleMakerPy (del Carpio Gutierrez et al., 2024) uses an LLM to generate Parsons problems that learners can customize by thematic context and targeted concepts. For LLM-generated worked examples, prior work has examined how prompting strategies affect content quality. Jury et al. (Jury et al., 2024) studied worked example generation for CS1 students with both expert and student evaluation, reporting that LLMs can produce generally coherent worked examples, while also noting LLM outputs often lacked novice-friendly detail in step structure and commenting. Related work has evaluated similar generation in a CS2 context (Lindvall and Marcus, 2024) and explored controllable rewriting that produces novice, intermediate, and advanced variants from a base worked example by adjusting step granularity and explanation detail (Smit, 2025). In this work, we condition LLM-based worked-example generation on pattern-based KCs extracted from learnerâs code submissions, ensuring these KCs appear in the generated exampleâs code and step explanations. This connects the generation of a worked example to an explicit representation of a learnerâs likely logical error, supporting more personalized, instructionally-relevant generation of worked examples at scale. 3. Methodology Our methodology has three stages. First, we extract pattern-based KCs from student submissions and enrich them with short, human-readable descriptions. Second, for each submission we generate two worked examples using a baseline prompting pipeline and a KC-conditioned prompting pipeline. Third, we evaluate the generated worked examples through expert review. 3.1. Dataset and Sampling We use a publicly available CodeWorkout dataset containing 57,670 anonymized Java submissions from 368 CS1 students collected in Spring 2019, including 18,787 correct and 38,883 incorrect submissions (Edwards and Murali, 2017). For this study, we randomly selected two out of fifty problems from the dataset, repeatEnd and fix45 111https://codeworkout.cs.vt.edu/gym/exercises. repeatEnd is a string task involving substring extraction and repetition (repeat the last n characters n times), while fix45 is an array task involving constrained rearrangement (reorder elements so each 4 is immediately followed by a 5 without moving the 4s). For each problem, we identify a studentâs last incorrect attempt by timestamp, since incorrect submissions provide the clearest evidence of studentsâ code patterns involving logical errors our worked-example generation pipeline was designed to address. From these candidate submissions, we randomly sample 50 submissions per problem, yielding 100 unique submissions overall. 3.2. Pattern-based KC Discovery and Labeling We adopt the pattern-based KC discovery pipeline of Hoq et al. (Hoq et al., 2025b) to derive submission-level KC targets from student code. The pipeline operationalizes a KC as a recurring AST-subtree pattern that corresponds to a programming construct or a common combination of constructs that appears across many student solutions. We run the pattern-based KC discovery pipeline on the full Codeworkout dataset following the procedure in (Hoq et al., 2025b), and use the resulting trained components to infer KC targets for the sampled submissions. Step 1: Identify important subtrees with attention. For each submission, we parse the program into an AST and extract candidate subtrees ranging from small local constructs to larger statement-level structures. These subtrees are fed to a Subtree-based Attention Neural Network (SANN) trained to predict whether a submission is correct or incorrect. SANN encodes each subtree into a fixed-length vector and assigns an attention weight indicating its importance for the prediction (Hoq et al., 2025b). Following Hoq et al. (Hoq et al., 2025b), attention weights are computed with a sigmoid activation so multiple subtrees can be highlighted within a program, identifying influential patterns in the code responsible for correctness. Step 2: Normalize subtree tokens for abstraction. We normalize each retained subtree by replacing identifiers and literals (e.g., variable names, constants, method names) with placeholders (Hoq et al., 2025b). This reduces sensitivity to surface-level variation that does not change program logic and supports grouping similar patterns across different student implementations. Step 3: Learn representations for clustering. We train a variational autoencoder (VAE) over sequences of high-attention subtrees to learn representations that reflect how each subtree appears in program context (Hoq et al., 2025b). The VAE is trained on high-attention subtrees from correct submissions so that structurally similar correct patterns embed nearby in the latent space (Hoq et al., 2025b). After training, we use the encoderâs latent vectors as inputs to clustering. Step 4: Cluster latent vectors into a KC inventory, then map submissions to KCs. We cluster the VAE latent vectors from correct submissions using K-means (k = 50 as in prior work) (Hoq et al., 2025b). At inference time, each high-attention subtree from either a correct or incorrect submission is assigned to its nearest cluster centroid to obtain a KC ID. In our study, these submission-level KC sets are the targets used to condition worked-example generation. Step 5: Enrich KC targets for prompting. Because cluster IDs, generated following (Hoq et al., 2025b), are not human-readable, we add an enrichment layer that attaches short labels and one-sentence descriptions to each submissionâs KC targets for use in prompts. For each KC assigned to a submission, we provide GPT-5.2 (gpt-5.2-chat-latest) with (i) the problem statement, (i) the student submission, and (i) a code snippet aligned to the high-attention subtree that triggered that KC assignment, then prompt it to produce a concise KC label (2â6 words) and a one-sentence description of the pattern. 3.3. Worked Example Generation With each student submission, we derive a submission-level KC target set from the code using the Hoq et al. (Hoq et al., 2025b) pipeline described in Section 3.2, and generate human-readable labels and a single-sentence description for every pattern-based KC. Using these KCs, we generate two worked examples per student submission with GPT-5.2 (gpt-5.2-chat-latest), one generated with the KC targets included in the prompt and one generated that omits KC information. Prompting and problem context. The two generation pipelines (baseline and KC-conditioned) use a shared prompt template that specifies a persona as an introductory programming tutor and lays out the task, response structure, and formatting guardrails. In both variants, the prompt provides the problem statement and the studentâs code, and instructs the model to infer what the student is struggling with and generate a worked example for a related but different problem that practices similar skills. The KC-conditioned variant additionally provides the student submissionâs extracted pattern-based KCs, as labels with single-sentence descriptions, and instructs the model to use these KCs as constraints when inferring the studentâs logical error and selecting what the worked example should practice and explain. Both pipelines enforce the same output format, based on prior work (Jury et al., 2024), where the LLM is instructed to produce a worked example with 3â10 steps, and each step pairs a brief explanation with a corresponding code fragment. Parameters for the GPT 5.2 models are left at default values, and full prompt templates are provided in Appendix A. 3.4. Expert Evaluation Experts evaluated baseline and KC-conditioned outputs using the rubric outlined in Table 1, adapted from prior work (Jury et al., 2024). Each rubric item is scored on a 0â2 scale, where 0 indicates the item criteria is not met, 1 indicates partial fulfillment (meets the item criteria in some aspects but with omissions), and 2 indicates the item criteria is fully met. For KC-conditioned outputs, experts additionally score KC coverage, which reflects whether the provided KC targets are instantiated in the worked example code and step explanations. Further, for each paired comparison, experts recorded their preference for the baseline or KC-conditioned worked example, or indicated no preference. Per student submission sampled, experts are shown the problem statement, the studentâs code, and the paired worked examples. For worked examples generated with pattern-based KCs, the KC labels and descriptions are also shown. The evaluation followed a procedure recommended by (Landis and Koch, 1977). Two experts first jointly coded an initial subset of generated worked examples (10%), then computed Cohenâs Kappa (Îș) on that subset to quantify agreement. Inter-rater agreement exceeding Îș = 0.80 was achieved on the first round (Îș = 0.90), after which the full set of generated worked examples was coded and analysis conducted. Paired Wilcoxon signed-rank tests and Holm corrected p-values were used when comparing baseline and KC-conditioned ratings. Item Description Formatting Does the output follow the required worked-example structure (3â10 steps), where each step pairs code with a matching written explanation and includes helpful inline // comments? Clear explanations Is the worked example easy to follow, with a clear, linear flow and little assumed prior knowledge? Correctness Is the code correct by inspection, and would it produce the intended behavior for the problem? Step structure Are the steps broken into manageable parts, with each step covering a specific part of the solution and avoiding large jumps? Relevance to the student Does the worked example address a misconception or logical error suggested by the student submission? KC coverage For KC-conditioned outputs, do the provided KC targets appear in the code and are they addressed in the step text in a way that clearly connects each target to the specific code where it appears? Table 1. Expert-evaluation rubric for worked examples. 4. Results RQ1: Worked example quality and relevance. Across 200 generated worked examples (100 baseline, 100 KC-conditioned), experts scored outputs on five rubric items, scaled 0â2 (Table 1). For KC-conditioned outputs, experts also rated a sixth item, KC coverage. The largest differences appeared on two items: novice-friendly explanations and student relevance (Table 2). KC-conditioned worked examples scored higher on student relevance (22% higher; p=0.001p=0.001), indicating that they more often addressed the logical error suggested by the student submission rather than offering a generic solution. KC-conditioned outputs also scored higher on novice-friendly explanations (13% higher; p=0.027p=0.027), which aligns with our observations that their step text more consistently explains the KC-targeted parts of the solution at a level of detail appropriate for novices. The remaining rubric items showed no statistically significant differences. Both pipelines consistently followed the intended worked example format and produced correct code at near perfect levels. However, one tradeoff we observed was that KC-conditioned outputs received slightly lower ratings in regard to their step-structure (5% lower; p=0.076p=0.076), which may reflect cases where incorporating additional KC targets leads the model to pack more content into each step, making step boundaries less distinct and step labels less informative. The preferences of the expert evaluators were considered, and were observed to be consistent with the rubric item ratings. Across 100 comparisons, experts had no preference for 50, preferred the KC-conditioned worked examples for 41, and preferred the baseline for 9. Based on our observations, preferences for the KC-conditioned output were typically tied to the outputs being more specific toward what the student likely misunderstood and more direct in addressing that gap, instead of presenting a broadly correct but generic solution. Rubric item Baseline M KC-conditioned M p-value Formatting 2.00 2.00 1.00 Clear explanations 1.81 1.94 0.027 Correctness 1.97 1.99 0.635 Step Structure 1.99 1.94 0.076 Relevance to the student 1.67 1.89 0.001 Table 2. Baseline vs. KC-conditioned ratings (0â2 scale). M denotes the mean expert rating across 200 generated worked examples. RQ2: KC Coverage. For KC-conditioned outputs, we asked whether the provided KC targets appear in the code and are explained in the step text in a way that link each target to the code where it appears. Alignment was high (mean =1.92=1.92 on a 0â2 scale), and of 100 examples, 92 fully met this criterion, with 8 partially aligned. Partial alignment occurred primarily when multiple KC targets were provided, where not all targets were addressed clearly in both the code and the step explanations. In these cases, the worked example often focused on one KC and mentioned others only briefly, and step boundaries were sometimes less distinct when the model attempted to address several targets at once. This suggests the prompt may need additional guidance for prioritizing multiple KC targets, including which targets to emphasize and how to allocate them across steps. Student code excerpt (problem fix45, code_id=43552) ⏠1if (i == 0 && nums[i] == 5 || nums[i] == 5 && nums[i-1] != 4) 2 int fiveSpot = i; 3 for (int m = i; m < nums.length; m++) 4 if (nums[m] == 4 && nums[m+1] != 5) 5 int otherNum = nums[m+1]; 6 nums[m+1] = 5; 7 nums[fiveSpot] = otherNum; 8 break; 9 Extracted pattern-based KC (label + description) ⏠1Pattern-based KC from the student submission: Boolean operator precedence 2 3Description: The student combines && and || in a single condition without parentheses, so the intended grouping may differ from Javaâs evaluation order. KC-conditioned worked example excerpt ⏠1Question: Write a method that counts how many numbers in an array are either negative OR are zeros that do not come immediately after another zero. Be careful to correctly combine && and || in your condition. 2 3Overview: This program will loop through an integer array and count values that meet a combined condition using both && and ||. We will use parentheses to make the logic clear and avoid mistakes with operator precedence. 4 5Step 1: Create the method and a counter variable. 6public int countSpecial(int[] nums) 7 int count = 0; // Keeps track of how many values meet the condition 8 9Step 2: Loop through the array so we can check each element. 10 for (int i = 0; i < nums.length; i++) // Go through every index 11 12Step 3: Use parentheses to clearly group && and || conditions. 13 // We want to count: 1) Any negative number OR 14 // 2) A zero that is NOT immediately after another zero 15 if (nums[i] < 0 || (nums[i] == 0 && (i == 0 || nums[i - 1] != 0))) 16 count++; // Increase count if condition is true 17 18 19Step 4: Finish the loop and return the result. 20 21 return count; // Return the final total 22 Figure 1. Example of a high-level pattern-based KC extracted from student code and used to guide worked-example generation, targeting explicit grouping of operations with parentheses. 5. Discussion and Future Work This work proposes a KC-guided worked example generation pipeline that uses pattern-based KCs extracted from student code (via AST subtree discovery) as constraints in the generation process. This is done so that the resulting worked examples generated practice and conceptually focus on the targeted pattern-based KCs from the students code. Across expert ratings, the KC-conditioned pipeline significantly improved evaluations of explanation clarity and relevance to the studentâs likely logical error. This result suggests that the use of KCs as a structured representation of what a learner needs to practice can support more targeted personalization of generated learning content. However, the partial KC-coverage cases also suggest that KC-guided generation needs mechanisms for deciding which targets to emphasize when a submission maps to several plausible KCs. In future work, these KC targets could be integrated into a broader learner modeling framework that tracks studentsâ mastery over time and uses that knowledge state to select and sequence KC-guided examples across practice opportunities. Future work will prioritize establishing potential learning impacts of our KC-conditioned worked examples. While expert evaluations indicate that KC inclusion can steer LLM-generation toward clearer and more instructionally-relevant instruction, an important question remains whether these examples improve learning and transfer. We plan future classroom studies where an incorrect submission triggers either a baseline or a KC-guided worked example, and we will measure improvement on a second attempt, performance on a related follow-up problem targeting the same KCs, and brief concept checks aligned with those targets. A limitation of our approach is that KC-guided generation quality depends on the quality and granularity of the discovered KC inventory and its labels, and on how accurately a new submission is mapped to the most instructionally-relevant targets. This can be challenging when a submission yields many plausible KC targets. We plan to address this by incorporating model attention weights in the generation process to prioritize KC targets, validating the human-readable KC descriptions with instructors, and testing robustness across additional problems and programming topics. Acknowledgements.This research was supported by the U.S. National Science Foundation (NSF) under Grant #2426837. Any opinions, findings, and conclusions expressed in this material are those of the authors and do not necessarily reflect views of the NSF. References P. Chandler and J. Sweller (1991) Cognitive load theory and the format of instruction. Cognition and instruction 8 (4), p. 293â332. Cited by: §1. A. del Carpio Gutierrez, P. Denny, and A. Luxton-Reilly (2024) Automating personalized parsons problems with customized contexts and concepts. In Proceedings of the 2024 on Innovation and Technology in Computer Science Education V. 1, p. 688â694. Cited by: §2. S. H. Edwards and K. P. Murali (2017) CodeWorkout: short programming exercises with built-in data collection. In Proceedings of the 2017 ACM conference on innovation and technology in computer science education, p. 188â193. Cited by: §3.1. M. Hoq, A. Patil, K. Akhuseyinoglu, P. Brusilovsky, and B. Akram (2025a) An automated approach to recommending relevant worked examples for programming problems. In Proceedings of the 56th ACM Technical Symposium on Computer Science Education V. 1, p. 527â533. Cited by: §1, §1. M. Hoq, G. Pitts, T. Bhatt, A. Pandya, A. Lan, P. Brusilovsky, and B. Akram (2025b) Pattern-based knowledge component extraction from student code using representation learning. arXiv preprint arXiv:2508.09281. Cited by: §1, §3.2, §3.2, §3.2, §3.2, §3.2, §3.2, §3.3. M. Hoq, A. Rao, R. Jaishankar, K. Piryani, N. Janapati, J. Vandenberg, et al. (2025c) Automated identification of logical errors in programs: advancing scalable analysis of student misconceptions. In Proceedings of the 18th International Conference on Educational Data Mining, p. 90â103. Cited by: §1. X. Hou, Z. Wu, X. Wang, and B. J. Ericson (2024) Codetailor: llm-powered personalized parsons puzzles for engaging support while learning programming. In Proceedings of the Eleventh ACM Conference on Learning@ Scale, p. 51â62. Cited by: §2. B. Jury, A. Lorusso, J. Leinonen, P. Denny, and A. Luxton-Reilly (2024) Evaluating llm-generated worked examples in an introductory programming course. In Proceedings of the 26th Australasian computing education conference, p. 77â86. Cited by: §1, §1, §1, §2, §3.3, §3.4. S. Kalyuga, P. Ayres, P. Chandler, and J. Sweller (2003) The expertise reversal effect. Educational Psychologist 38 (1), p. 23â31. External Links: Document, Link, https://doi.org/10.1207/S15326985EP3801_4 Cited by: §1. K. R. Koedinger, A. T. Corbett, and C. Perfetti (2012) The knowledge-learning-instruction framework: bridging the science-practice chasm to enhance robust student learning. Cognitive Science 36 (5), p. 757â798. Cited by: §1. J. R. Landis and G. G. Koch (1977) The measurement of observer agreement for categorical data. biometrics, p. 159â174. Cited by: §3.4. V. Lindvall and S. Marcus (2024) Using large language models to generate worked examples of cs2-level programming questions. Cited by: §2. K. Muldner, J. Jennings, and V. Chiarelli (2022) A review of worked examples in programming activities. ACM Transactions on Computing Education 23 (1), p. 1â35. Cited by: §1. G. Pitts, A. P. Hridi, and A. B. L. Narayanan (2025) A survey of llm-based applications in programming education: balancing automation and human oversight. In Proceedings of the Fourth Workshop on Bridging Human-Computer Interaction and Natural Language Processing (HCI+ NLP), p. 255â262. Cited by: §1. B. Skudder and A. Luxton-Reilly (2014) Worked examples in computer science. In Proceedings of the Sixteenth Australasian Computing Education Conference-Volume 148, p. 59â64. Cited by: §1. Y. Smit (2025) Personalising llm-generated worked examples based on skill level in introductory programming. Masterâs Thesis. Cited by: §1, §1, §2. J. Sweller (1988) Cognitive load during problem solving: effects on learning. Cognitive science 12 (2), p. 257â285. Cited by: §1. Appendix A Prompt Templates https://osf.io/4h9dn/overview?view_only=97189a73e56b4254bd2298669b6eabc4