Programming can be challenging for novices, and it is difficult to provide high-quality, comprehensive, and timely support at scale. Generative AI and its products, like ChatGPT, can create a solution for most introductory programming problems. However, students may become overly reliant on these tools for quick code generation and homework completion, which might cause reduced engagement and limited learning. In this work, we present CodeTailor, a system that leverages large language models (LLMs) while still encouraging students' cognitive engagement. CodeTailor provides a personalized Parsons puzzle to support struggling students. In a Parsons puzzle, students place mixed-up code blocks in the correct order to solve it. A technical evaluation with 800 incorrect student code demonstrated that CodeTailor can efficiently create high-quality (correct, personalized, and concise) Parsons puzzles for students. In a within-subjects experiment with 18 novice programmers, students rated using CodeTailor as more engaging, and they recalled more newly acquired elements from the supported practice in the posttest after using CodeTailor, compared to when they simply received an AI-generated solution. In addition, most students preferred to use CodeTailor over receiving an AI-generated solution to support learning. Qualitative observations and interviews also provided evidence for the benefits of CodeTailor, including emphasizing thinking about solution construction, fostering continuity in learning, promoting reflection, and boosting student confidence. We conclude by suggesting future design ideas for applying generative AI to facilitate active learning opportunities and minimize over-reliance.
翻译:编程对初学者而言具有挑战性,大规模提供高质量、全面且及时的支持颇为困难。生成式AI及其产品(如ChatGPT)能为大多数入门编程问题生成解决方案,但学生可能过度依赖这些工具快速生成代码或完成作业,导致参与度降低和学习效果受限。本研究提出CodeTailor系统——在利用大语言模型(LLMs)的同时促进学生认知参与。该系统为遇到困难的学生提供个性化帕森斯谜题(Parsons puzzle),即通过将打乱的代码块按正确顺序排列来解决问题。对800个错误学生代码的技术评估表明,CodeTailor能高效生成高质量(正确、个性化且简洁)的帕森斯谜题。在18名编程初学者的被试内实验中,与直接获得AI生成解决方案相比,学生认为使用CodeTailor的参与度更高,且在后测中能更准确地回忆通过该练习新习得的知识点。此外,大多数学生更倾向于使用CodeTailor而非AI生成方案来支持学习。质性观察与访谈进一步证明了CodeTailor的优势,包括强调思考解题方案建构、促进学习连续性、激发反思及增强学生信心。最后,我们提出未来设计思路,旨在通过生成式AI促进主动学习机会并减少过度依赖。