让AI解释代码时能忠实引用教材,提升可验证性。
Illocutionary Explanation Planning for Source-Faithful Explanations in Retrieval-Augmented Language Models

- 用隐含提问驱动检索,让解释紧扣原始教材
- 改进后模型源文匹配率最高达63%,显著提升可信度
- 适合教育类AI、需要可追溯解释的场景
大语言模型生成的自然语言解释虽具说服力,但难以验证其内容是否基于真实证据。在可解释AI领域,这推动了对忠实性与可追溯性的关注——即解释中的主张能否明确源自并回溯到具体来源。本文聚焦编程教育中的检索增强生成(RAG),以三本教材作为权威证据源,对六种大模型在90个基于Stack Overflow的问题上进行评估,并通过源文遵循度指标量化忠实性。结果发现,非RAG模型的中位源文遵循度为0%,基线RAG系统也仅在22%-40%之间。受阿钦斯坦的言外之意解释理论启发,提出言外之意宏观规划作为设计原则,并实现为链式言外提示(CoI),将查询扩展为隐含的解释性问题以引导检索。跨模型测试显示,CoI使源文遵循度提升至最高63%,统计显著;尽管绝对值仍中等,部分模型增益不显著。165名参与者(共招募220人)的用户研究显示,该改进未降低满意度、相关性或感知正确性。
原文摘要 · Abstract (English)
Natural language explanations produced by large language models (LLMs) are often persuasive, but not necessarily scrutable: users cannot easily verify whether the claims in an explanation are supported by evidence. In XAI, this motivates a focus on faithfulness and traceability, i.e., the extent to which an explanation's claims can be grounded in, and traced back to, an explicit source. We study these desiderata in retrieval-augmented generation (RAG) for programming education, where textbooks provide authoritative evidence. We benchmark six LLMs on 90 Stack Overflow questions grounded in three programming textbooks and quantify source faithfulness via source adherence metrics. We find that non Retrieval-Augmented Generation (RAG) models have median source adherence of 0%, while baseline RAG systems still exhibit low median adherence (22-40%, depending on the model). Motivated by Achinstein's illocutionary theory of explanation, we introduce illocutionary macro-planning as a descriptive design principle for source-faithful explanations and instantiate it with chain-of-illocution prompting (CoI), which expands a query into implicit explanatory questions that drive retrieval. Across models, CoI yields statistically significant gains (up to 63%) in source adherence, although absolute adherence remains moderate and the gains are weak or non-significant for some models. A user study with 165 retained participants (220 recruited) indicates that these gains do not harm satisfaction, relevance, or perceived correctness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。