从程序切片到因果清晰:通过上下文划分和LLM作为评判者评估忠实、可操作的LLM生成故障解释
From Program Slices to Causal Clarity: Evaluating Faithful, Actionable LLM-Generated Failure Explanations via Context Partitioning and LLM-as-a-Judge
AI总结:
本文研究了LLM生成的故障解释质量如何受不同上下文配置影响,通过上下文划分和LLM作为评判者的方法,评估了忠实且可操作的解释,并发现丰富的证据和特定故障的艺术品提高了因果和行动质量,而过大的上下文则导致解释模糊。
摘要:
基于大型语言模型(LLM)的调试系统可以生成故障解释,但这些解释可能不完整或错误。误导性的解释对下游任务(例如,bug分拣、bug修复)有害。我们研究了解释质量如何受到各种LLM上下文配置的影响。现有工作大多将LLM生成的故障解释视为调试或修复工作流程的附带产物,使用通用提示处理未区分的artifact(如代码、测试和错误信息)而不是将解释作为首要输出并专门进行质量评估。因此,现有方法对评估这些解释是否捕捉到底层故障-错误-失败机制以及可操作的下一步支持有限,大多数技术优先考虑任务成功(例如,补丁正确性或审查质量)而非显式的因果解释质量。我们系统地变化调试信息,研究不同的上下文组成如何影响LLM生成的故障解释质量。在93种上下文配置(真实bug和三个经济可行的模型(gpt-5-mini, DeepSeek-V3.2, and Grok-4.1-fast))上,我们使用六个标准评估解释,并在用户研究中验证LLM作为评判者的分数与人类评分。我们的结果表明,解释质量受上下文组成影响因果。证据丰富、特定故障的艺术品提高了因果和行动质量,而过于大的上下文则导致解释模糊。较高解释评分四分位数与较高的下游修复通过率以及某些模型的修复更接近参考最小修复相关。相反,低分四分位数甚至可能低于无解释基线。重现包已公开可用。
英文摘要:
Large language model (LLM)-based debugging systems can generate failure explanations, but these explanations may be incomplete or incorrect. Misleading explanations are harmful for downstream tasks (e.g., bug triage, bug fixing). We investigate how explanation quality is affected by various LLM context configurations. Existing work predominantly treats LLM-generated failure explanations as an ad hoc by-product of debugging or repair workflows, using generic prompting over undifferentiated artifacts such as code, tests, and error messages rather than targeting explanations as a first-class output with dedicated quality assessment. Consequently, existing approaches provide limited support for assessing whether these explanations capture the underlying fault-error-failure mechanism and for actionable next steps, and most techniques instead prioritize task success (e.g., patch correctness or review quality) over the explicit causal explanation quality. We systematically vary the debugging information to study how distinct context compositions affect the quality of LLM-generated failure explanations. Across 93 context configurations on real bugs and three economically viable models (gpt-5-mini, DeepSeek-V3.2, and Grok-4.1-fast), we evaluate explanations with six criteria and validate the LLM-as-a-judge scores against human ratings in a user study. Our results indicate that explanation quality is causally affected by context composition. Evidence-rich, failure-specific artifacts improve causal and action-oriented quality, whereas overly large contexts tend to yield vague explanations. Higher explanation-score quartiles are associated with higher downstream repair pass rates and, for some models, with fixes that are closer to the reference minimal fixes. In contrast, low-score quartiles can even underperform the no-explanation baseline. Reproduction package is publicly available.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。