Large language models (LLMs) exhibit powerful general intelligence across diverse scenarios, including their integration into chatbots. However, a vital challenge of LLM-based chatbots is that they may produce hallucinated content in responses, which significantly limits their applicability. Various efforts have been made to alleviate hallucination, such as retrieval augmented generation and reinforcement learning with human feedback, but most of them require additional training and data annotation. In this paper, we propose a novel post-hoc \textbf{C}itation-\textbf{E}nhanced \textbf{G}eneration (\textbf{CEG}) approach combined with retrieval argumentation. Unlike previous studies that focus on preventing hallucinations during generation, our method addresses this issue in a post-hoc way. It incorporates a retrieval module to search for supporting documents relevant to the generated content, and employs a natural language inference-based citation generation module. Once the statements in the generated content lack of reference, our model can regenerate responses until all statements are supported by citations. Note that our method is a training-free plug-and-play plugin that is capable of various LLMs. Experiments on various hallucination-related datasets show our framework outperforms state-of-the-art methods in both hallucination detection and response regeneration on three benchmarks. Our codes and dataset will be publicly available.
翻译:大型语言模型在多种场景中展现出强大的通用智能,包括其与聊天机器人的集成。然而,基于大型语言模型的聊天机器人面临的关键挑战是可能产生包含幻觉内容的回复,这严重限制了其适用性。目前已有多种缓解幻觉的努力,例如检索增强生成和基于人类反馈的强化学习,但大多数方法需要额外的训练和数据标注。本文提出了一种新颖的事后引用增强生成方法,并结合检索增强策略。与以往专注于在生成过程中防止幻觉的研究不同,我们的方法采用事后方式解决该问题。该方法包含一个检索模块,用于搜索与生成内容相关的支持文档,并采用基于自然语言推理的引用生成模块。当生成内容中的陈述缺乏引用时,我们的模型可重新生成回复,直至所有陈述均获得引用支持。值得注意的是,我们的方法是一种无需训练的即插即用插件,适用于多种大型语言模型。在多个幻觉相关数据集上的实验表明,我们的框架在三个基准测试中均优于现有最先进的幻觉检测和回复重生成方法。我们的代码和数据集将公开发布。