arXiv:2511.00371cs.CLcs.CY2025-11

用推理轨迹引导学生发现编程误解,实现自主纠错。

Reasoning Trajectories for Socratic Debugging of Student Code: From Misconceptions to Contradictions and Updated Beliefs

  • 设计推理轨迹,引导学生从错误认知走向逻辑矛盾。
  • 大模型生成的推理轨迹准确率达91%,对话有效率98.7%。
  • 适合教育科技、自动编程辅导系统开发者使用。

在苏格拉底式调试中,教师不直接给出代码修复方案,而是引导学生自主发现并修正错误。大多数新手程序员的错误源于对编程概念的误解,即错误信念。在此背景下,苏格拉底式调试可被建模为一条引导学生得出与错误信念相矛盾的程序行为判断的推理轨迹(RT)。当学生意识到矛盾时,认知失调将促使他们自行识别错误信念,并完成持久的认知更新。本文提出推理轨迹生成任务,构建了包含人工标注和大模型生成轨迹的调试数据集。进一步描述了基于大模型的推理轨迹生成及以之为基础的苏格拉底式对话生成方法。大规模大模型自评实验表明,大型语言与推理模型可生成高达91%正确的推理轨迹和98.7%有效的对话回合。

原文摘要 · Abstract (English)

In Socratic debugging, instructors guide students towards identifying and fixing a bug on their own, instead of providing the bug fix directly. Most novice programmer bugs are caused by programming misconceptions, namely false beliefs about a programming concept. In this context, Socratic debugging can be formulated as a guided Reasoning Trajectory (RT) leading to a statement about the program behavior that contradicts the bug-causing misconception. Upon reaching this contradiction, the ensuing cognitive dissonance is expected to lead the student to identify the false belief on their own, followed by an enduring belief update. In this paper, we introduce the task of reasoning trajectory generation, together with a dataset of debugging problems annotated with RTs that are manually created or LLM-generated. We then describe LLM-based solutions for generating RTs and Socratic conversations that are anchored on them. A large-scale LLM-as-judge evaluation shows that large language and reasoning models can generate up to 91% correct reasoning trajectories and 98.7% valid conversation turns.

编程教育推理轨迹苏格拉底式教学大模型应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。