arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2406.11277cs.CL
收藏

小智能体也能出彩!赋能小型语言模型作为幻觉检测器

Small Agent Can Also Rock! Empowering Small Language Models as Hallucination Detector

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);DIRO, Université de Montréal(蒙特利尔大学 DIRO 学院);Kuaishou(快手);School of Information, Renmin University of China(中国人民大学信息学院)

Xiaoxue Cheng, Junyi Li, Wayne Xin Zhao, Hongzhi Zhang, Fuzheng Zhang, Di Zhang, Kun Gai, Ji-Rong Wen

AI总结:

提出 HaluAgent 框架,通过工具箱、三阶段流程、记忆机制和 2K 条双语轨迹微调,让 7B 级小模型完成多类型幻觉检测,性能可比肩甚至超过无工具增强的 GPT-4。

摘要:

幻觉检测对大型语言模型(LLM)而言是一项具有挑战性的任务,现有研究严重依赖 GPT-4 等功能强大的闭源 LLM。本文提出一种基于 LLM 的自主智能体框架 HaluAgent,使相对较小的 LLM(例如 Baichuan2-Chat 7B)能够主动选择合适工具,以检测文本、代码和数学表达式等多种幻觉类型。在 HaluAgent 中,我们集成了 LLM 和多功能工具箱,并设计了带有记忆机制的细粒度三阶段检测框架。为提升 HaluAgent 的有效性,我们利用现有中英文数据集合成检测轨迹用于微调,使其具备双语幻觉检测能力。大量实验表明,仅使用 2K 个样本微调 LLM,HaluAgent 即可在多种任务和数据集上执行幻觉检测,并在域内和域外数据集上取得与未使用工具增强的 GPT-4 相当甚至更高的性能。我们在 https://github.com/RUCAIBox/HaluAgent 发布数据集和代码。

英文摘要:

Hallucination detection is a challenging task for large language models (LLMs), and existing studies heavily rely on powerful closed-source LLMs such as GPT-4. In this paper, we propose an autonomous LLM-based agent framework, called HaluAgent, which enables relatively smaller LLMs (e.g. Baichuan2-Chat 7B) to actively select suitable tools for detecting multiple hallucination types such as text, code, and mathematical expression. In HaluAgent, we integrate the LLM, multi-functional toolbox, and design a fine-grained three-stage detection framework along with memory mechanism. To facilitate the effectiveness of HaluAgent, we leverage existing Chinese and English datasets to synthesize detection trajectories for fine-tuning, which endows HaluAgent with the capability for bilingual hallucination detection. Extensive experiments demonstrate that only using 2K samples for tuning LLMs, HaluAgent can perform hallucination detection on various types of tasks and datasets, achieving performance comparable to or even higher than GPT-4 without tool enhancements on both in-domain and out-of-domain datasets. We release our dataset and code at https://github.com/RUCAIBox/HaluAgent.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑