计算机科学与探索

• 学术研究 •    下一篇

大语言模型幻觉现象的分类识别与优化研究

何静, 沈阳, 谢润锋   

  1. 1. 北京航空航天大学 人文与社会科学高等研究院,北京 100191
    2. 清华大学 新闻与传播学院,北京 100084
    3. 北京工业大学 信息学部,北京,100124

Research on Categorical Recognition and Optimization of Hallucination Phenomenon in Large Language Models

HE Jing, SEHN Yang, XIE Runfeng   

  1. 1. Institute for Advanced Studied in Humanities and Social Sciences, Beihang University, Beijing 100191, China
    2. School of Journalism and Communication, Tsinghua University, Beijing 100084, China
    3. Faculty of Information Technology, Beijing University of Technology, Beijing 100124, China

摘要: 随着大语言模型在自然语言理解和生成任务上的广泛应用,其在医疗、法律和科研等高精度领域的表现被愈发关注。然而,幻觉现象作为大语言模型普遍存在的问题,极大制约了其在这些领域的实际应用。当前,针对大语言模型幻觉现象的评估和优化尚存在显著不足:首先,缺乏高质量的高精度领域幻觉评估数据集;其次,现有幻觉评估方法大多依赖单一模型,未能充分利用多模型间的差异性优势;最后,不同模型在幻觉类型和幻觉率上表现存在较大差异,尚未有有效方法来降低高幻觉率模型的幻觉现象。本研究采用数据集构建-群体智能选举-幻觉分类与量化-先验知识优化的系统流程,全面评估和优化了大语言模型在医疗问答领域的幻觉现象。首先,根据公开数据集Huatuo,结合GPT4生成问题答案和人工标注的形式构建了医疗问答领域大模型幻觉评估数据集;其次,使用GPT4o、GPT4、ChatGLM4、Baichuan-13B和Claude 3.5等先进的大语言模型对数据集中的问题生成答案。通过一种基于群体智能的方法,选举出一个LeaderAI,它将各模型的回答与参考答案进行比较,从而确定各模型的幻觉率。最后,进一步将幻觉分为事实性幻觉和忠实性幻觉两类。研究结果表明,在LeaderAI的指导下,被评估的大模型的幻觉率显著下降,特别是忠实性幻觉率明显降低。

关键词: 大语言模型, 幻觉识别, 幻觉分类, 模型优化

Abstract: With the widespread application of big language models in natural language understanding and generation tasks, their performance in high-precision fields such as healthcare, law, and scientific research has received increasing attention. However, the phenomenon of hallucinations, as a common problem in large language models, greatly restricts its practical application in these fields. At present, there are significant shortcomings in the evaluation and optimization of hallucination phenomena in large language models. Firstly, there is a lack of high-quality and high-precision domain hallucination evaluation datasets; Secondly, most of the existing hallucination assessment methods rely on a single model, which fails to take full advantage of the differences between multiple models; Finally, there are significant differences in the performance of different models in terms of hallucination types and rates, and there is currently no effective method to reduce the hallucination phenomenon in high hallucination rate models. This study adopts a systematic process of dataset construction, swarm intelligence election, hallucination classification and quantification, and prior knowledge optimization to comprehensively evaluate and optimize the hallucination phenomenon of large language models in the field of medical question answering. Firstly, based on the publicly available dataset Huatuo, a large model illusion evaluation dataset in the medical question answering field was constructed by combining GPT generated question answers and manual annotation; Secondly, advanced big language models such as GPT4o, GPT4, ChatGLM4, Baichuan-13b, and Claude 3.5 are used to generate answers to questions in the dataset. By using a swarm intelligence based method, a LeaderAI is elected, which compares the answers of each model with reference answers to determine the illusion rate of each model. Finally, hallucinations are further divided into two categories: factual hallucinations and fidelity hallucinations. The research results indicate that under the guidance of LeaderAI, the illusion rate of the evaluated large models significantly decreases, especially the fidelity illusion rate.

Key words: large language model, hallucination recognition, hallucination classification, model optimization