Retrieval-Augmented Generation (RAG) has become a key paradigm for reducing factual hallucinations in large language models (LLMs), yet little is known about how the order of retrieved documents affects model behavior. We empirically show that under Top-5 retrieval with the gold document included, LLM answers vary substantially across permutations of the retrieved set, even when the gold document is fixed in the first position. This reveals a previously underexplored sensitivity to retrieval permutations. Although robust RAG methods primarily focus on enhancing LLM robustness to low-quality retrieval and mitigating positional bias to distribute attention fairly over long contexts, neither approach directly addresses permutation sensitivity. In this paper, we propose Stable-RAG, which exploits permutation sensitivity estimation to mitigate permutation-induced hallucinations. Stable-RAG runs the generator under multiple retrieval orders, clusters hidden states, and decodes from a cluster-center representation that captures the dominant reasoning pattern. It then uses these reasoning results to align hallucinated outputs toward the correct answer, encouraging the model to produce consistent and accurate predictions across document permutations. Experiments on three QA datasets show that Stable-RAG significantly improves answer accuracy, reasoning consistency and robust generalization across datasets, retrievers, and input lengths compared with baselines.
翻译:检索增强生成(RAG)已成为减少大语言模型事实性幻觉的关键范式,然而检索文档的顺序如何影响模型行为却鲜为人知。我们通过实验证明,在包含黄金文档的Top-5检索设置下,即使黄金文档固定于首位,大语言模型的答案也会随检索集合的排列方式发生显著变化。这揭示了一种先前未被充分探索的检索排列敏感性。尽管现有鲁棒RAG方法主要关注增强大语言模型对低质量检索的鲁棒性,以及通过缓解位置偏差在长上下文中公平分配注意力,但两种方法均未直接解决排列敏感性问题。本文提出稳定RAG方法,通过利用排列敏感性估计来缓解排列诱导的幻觉。稳定RAG在多种检索顺序下运行生成器,对隐藏状态进行聚类,并从捕获主导推理模式的聚类中心表示进行解码。随后利用这些推理结果将幻觉输出对齐至正确答案,促使模型在不同文档排列下产生一致且准确的预测。在三个问答数据集上的实验表明,与基线方法相比,稳定RAG在答案准确性、推理一致性以及跨数据集、检索器和输入长度的鲁棒泛化能力方面均有显著提升。