[论文解读] Can We Improve Educational Diagram Generation with In-Context Examples? Not if a Hallucination Spoils the Bunch
本文提出一种基于RST的在-context学习方法,用于让大型语言模型生成教育示意图,评估其对图像质量与降噪幻觉的影响,并分析上下文复杂度如何影响性能。研究发现幻觉及上下文不一致性可能减少,但受LLM随机性影响显著,且存在 inherited hallucinations 的风险。
Generative artificial intelligence (AI) has found a widespread use in computing education; at the same time, quality of generated materials raises concerns among educators and students. This study addresses this issue by introducing a novel method for diagram code generation with in-context examples based on the Rhetorical Structure Theory (RST), which aims to improve diagram generation by aligning models' output with user expectations. Our approach is evaluated by computer science educators, who assessed 150 diagrams generated with large language models (LLMs) for logical organization, connectivity, layout aesthetic, and AI hallucination. The assessment dataset is additionally investigated for its utility in automated diagram evaluation. The preliminary results suggest that our method decreases the rate of factual hallucination and improves diagram faithfulness to provided context; however, due to LLMs' stochasticity, the quality of the generated diagrams varies. Additionally, we present an in-depth analysis and discussion on the connection between AI hallucination and the quality of generated diagrams, which reveals that text contexts of higher complexity lead to higher rates of hallucination and LLMs often fail to detect mistakes in their output.
研究动机与目标
- 在LLM输出中的幻觉背景下,激励并提升AI生成的教育示意图的可靠性。
- 引入基于RST的方法,以选择在-context演示来引导示意图生成。
- 开发评估示意图质量(逻辑组织、连贯性、布局)与幻觉的量表与评估框架。
- 在专家评估者与自动化指标下,经验性比较基于RST的ICL变体与零-shot生成。
提出的方法
- 为示意图代码生成定义一个基于RST的信息在-context学习(ICL)管线。
- 实现两种RST引导变体(RST1和RST2),并与零-shot生成进行比较。
- 使用相似性检索步骤,根据RST结构挑选演示示例。
- 用逐步的EDU解析和RST引导指令提示LLMs,以生成Graphviz dot代码。
- 应用迭代修复与改进步骤,确保可渲染的示意图。
- 以五分制量表评估图像在逻辑组织、连通性、布局等方面,并进行幻觉检测(事实性与可信度)。
- 探索自动化评估方法(隐式/显式学习与反思提示),并与人工评估进行比较。

实验结果
研究问题
- RQ1RQ1:相较于零-shot生成,RST基础的在-context示例是否能提升逻辑组织、连通性与布局质量?
- RQ2RQ2:基于LLM的示意图评估是否与人工专家评估一致?
- RQ3RQ3:幻觉在不同管线步骤与上下文下如何影响示意图质量?
- RQ4RQ4:自动化评估方法是否能可靠地映射到人类对示意图质量与幻觉检测的判断?
主要发现
- RST1与o3模型在某些评判准则上产生了更高质量的示意图,相较于某些基线,RST基础方法降低了上下文不一致性与事实性幻觉。
- GPT-4o 对上下文复杂度更敏感,在高级文本中幻觉率较高;而o3在不同上下文中的表现更为鲁棒。
- 来自早期步骤的Inherited幻觉( H_inh )常导致最终示意图质量下降,尤在RST2中表现明显。
- 自动化评估中的显式与反思提示(E2、E3)与人工判断的吻合度高于隐式评估(E1)。
- 示意图中常包含提供上下文中未出现的信息,表明LLMs在上下文整合方面存在挑战。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。