[论文解读] Dcc --help: Generating Context-Aware Compiler Error Explanations with Large Language Models
本文介紹了 dcc --help,這是一款開源工具,將大型語言模型(LLM)整合至除錯C編譯器(DCC)中,針對編譯時與執行時錯誤生成上下文相關、適合初學者的解釋。透過以原始程式碼、錯誤位置與標準錯誤訊息提示LLM,系統產生具行動指引性、自然語言的說明——在編譯時錯誤上達成90%的概念正確率,執行時錯誤則達75%,且在大型CS1/CS2課程中獲得學生高度採用。
In the challenging field of introductory programming, high enrollments and failure rates drive us to explore tools and systems to enhance student outcomes, especially automated tools that scale to large cohorts. This paper presents and evaluates the dcc --help tool, an integration of a Large Language Model (LLM) into the Debugging C Compiler (DCC) to generate unique, novice-focused explanations tailored to each error. dcc --help prompts an LLM with contextual information of compile- and run-time error occurrences, including the source code, error location and standard compiler error message. The LLM is instructed to generate novice-focused, actionable error explanations and guidance, designed to help students understand and resolve problems without providing solutions. dcc --help was deployed to our CS1 and CS2 courses, with 2,565 students using the tool over 64,000 times in ten weeks. We analysed a subset of these error/explanation pairs to evaluate their properties, including conceptual correctness, relevancy, and overall quality. We found that the LLM-generated explanations were conceptually accurate in 90% of compile-time and 75% of run-time cases, but often disregarded the instruction not to provide solutions in code. Our findings, observations and reflections following deployment indicate that dcc-help provides novel opportunities for scaffolding students' introduction to programming.
研究动机与目标
- 透過改善學生取得有意義錯誤反饋的管道,解決初學程式設計(CS1)課程中高失敗率與流失率的問題。
- 克服因難以理解、無助的編譯器錯誤訊息,導致初學者難以理解與解決程式錯誤的限制。
- 在傳統教學支援不足的情況下,將個人化、即時的除錯協助擴展至大規模學生群。
- 利用生成式AI,將編譯器從被動的錯誤報告者轉變為主動的、上下文相關的學習導師。
- 評估在數千名學生的真實教育場景中,LLM生成解釋的可行性、品質與影響力。
提出的方法
- 將大型語言模型(GPT-3.5-turbo-0301)直接整合至DCC編譯器流程中,以生成即時解釋。
- 以上下文資訊(原始程式碼、錯誤位置、原始編譯器錯誤訊息)提示LLM。
- 指示LLM產生針對初學者的、具概念性且具行動指引性的解釋,不提供直接的程式碼解決方案。
- 實施使用頻率限制與警告機制,防止過度依賴,促進批判性思考。
- 在澳洲一所大型大學的CS1與CS2課程中部署該工具,讓學生可即時存取解釋。
- 收集並分析十週內來自2,565名學生的64,000筆錯誤/解釋配對,以評估解釋品質與使用模式。
实验结果
研究问题
- RQ1LLM生成的解釋在多大程度上對C程式設計的編譯時與執行時錯誤具備概念正確性?
- RQ2學生在實際使用中如何使用dcc --help?其使用是否與學業截止日期或難度層級相關?
- RQ3LLM生成的解釋是否能有效支援初學者程式設計者,而不提供直接的程式碼解決方案?
- RQ4此類工具對學生學習成果與除錯信心的實際感知與可衡量影響為何?
- RQ5將生成式AI整合至編譯器中,如何改變編譯器從錯誤報告者轉變為主動學習支援的角色?
主要发现
- LLM生成的解釋在90%的編譯時錯誤案例與75%的執行時錯誤案例中具備概念正確性。
- 儘管有指示避免提供程式碼解決方案,LLM仍頻繁提供直接的程式碼修復,顯示需要更強的提示約束。
- 該工具在十週內被2,565名學生使用超過64,000次,使用次數在主要評估截止日前明顯上升。
- 學生對該工具表現出高度參與度,顯示其被視為一種具價值且易取得的學習輔助工具。
- 期末考中未觀察到明顯的表現下滑——顯示該工具未對學習成果造成負面影響。
- 將生成式AI整合至編譯器中,使編譯器的角色轉變為主動的、上下文相關的學習夥伴,進而大規模提升學生支援效能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。