| 摘要: | 程式設計能力已成為大學生的重要基礎素養,但初學者在學習過程中常遭遇錯誤診斷困難、策略修正不足與認知負荷過高等挑戰。現有錯誤提示系統多僅提供簡略訊息,缺乏語意理解與策略引導,難以有效支援學習歷程。為改善此困境,本研究整合生成式人工智慧 (Generative Artificial Intelligence)、自我調節學習 (Self-Regulated Learning) 與認知負荷理論 (Cognitive Load Theory),建置適性程式輔助系統 CodeRev,透過分層提示提供策略性錯誤診斷與回顧,促進錯誤修正、自主學習與概念鞏固,同時控制認知負荷。 本研究首先評估六款大型語言模型的回饋品質,確認 GPT-4o 在錯誤說明與修正建議方面表現最佳,作為系統主力模型。接著透過八週準實驗,比較學生在程式實作、知識測驗、自我調節能力與認知負荷等面向的差異。結果顯示,CodeRev 能顯著提升學生在程式知識測驗與實作任務中的表現,協助其將所學概念應用於實際問題解決;同時在目標設定與協助尋求等自我調節歷程上展現正向影響,不僅未增加認知負荷,反而有助於平衡外在與內在負荷,進而促進深度學習。 綜合而言,本研究驗證生成式人工智慧結合學習理論於錯誤診斷支援之潛力,並為策略性提示與個別化學習輔助系統的設計提供理論依據與實證參考。 ;Programming ability has become a fundamental competency for university students. However, beginners often face challenges such as difficulties in error diagnosis, insufficient strategy for error correction, and high cognitive load during the learning process. Existing error feedback systems typically provide only brief messages, lacking semantic understanding and strategic guidance, which limits their effectiveness in supporting students’ learning trajectories. To address these issues, this study integrates Generative Artificial Intelligence (GenAI), Self-Regulated Learning (SRL), and Cognitive Load Theory (CLT) to develop an adaptive programming assistance system named CodeRev. The system provides strategic error diagnosis and retrospective feedback through tiered prompts, aiming to support error correction, foster autonomous learning, and reinforce conceptual understanding while managing cognitive load. The study first evaluates the feedback quality of six large language models and identifies GPT-4o as the most effective in delivering accurate error explanations and revision suggestions, thus adopting it as the core model in CodeRev. A quasi-experimental study was then conducted over eight weeks to compare students’ performance in programming tasks, knowledge assessments, self-regulated learning behaviors, and cognitive load. The results indicate that CodeRev significantly enhances students’ performance in programming knowledge tests and practical tasks by helping them apply learned concepts to real-world problem solving. Moreover, the system positively influences SRL processes such as goal setting and help-seeking, without increasing cognitive load. Instead, it contributes to balancing extraneous and intrinsic load, thereby facilitating deeper learning. Overall, the study confirms the potential of GenAI grounded in learning theory to support error-based programming education, offering theoretical and empirical insights for the design of strategic and personalized learning systems. |