《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (3): 709-714.DOI: 10.11772/j.issn.1001-9081.2024081190

• 大模型前沿研究与典型应用 • 上一篇    下一篇

大语言模型幻觉现象的识别与优化

何静1, 沈阳2(), 谢润锋3   

  1. 1.北京航空航天大学 人文与社会科学高等研究院,北京 100083
    2.清华大学 新闻与传播学院,北京 100084
    3.北京工业大学 信息科学技术学院,北京 100124
  • 收稿日期:2024-08-23 修回日期:2024-11-09 接受日期:2024-11-12 发布日期:2024-11-19 出版日期:2025-03-10
  • 通讯作者: 沈阳
  • 作者简介:何静(1989—),女,四川遂宁人,讲师,博士,主要研究方向:人工智能、大数据
    谢润锋(1999—),男,福建漳州人,硕士研究生,主要研究方向:自然语言处理。
  • 基金资助:
    2023年北京市社会科学基金资助项目(23XCC020);青少年心理健康与危机智能干预安徽省哲学社会科学重点实验室开放基金项目(SYS2023A07)

Recognition and optimization of hallucination phenomena in large language models

Jing HE1, Yang SHEN2(), Runfeng XIE3   

  1. 1.Institute for Advanced Studies in Humanities and Social Sciences,Beihang University,Beijing 100083,China
    2.School of Journalism and Communication,Tsinghua University,Beijing 100084,China
    3.School of Information Science and Technology,Beijing University of Technology,Beijing 100124,China
  • Received:2024-08-23 Revised:2024-11-09 Accepted:2024-11-12 Online:2024-11-19 Published:2025-03-10
  • Contact: Yang SHEN
  • About author:HE Jing, born in 1989, Ph. D., lecturer. Her research interests include artificial intelligence, big data.
    XIE Runfeng, born in 1999, M. S. candidate. His research interests include natural language processing.
  • Supported by:
    2023 Beijing Social Science Fund Program(23XCC020);Open Fund of Youth Mental Health and Crisis Intelligent Intervention Anhui Provincial Key Laboratory of Philosophy and Social Sciences(SYS2023A07)

摘要:

针对大语言模型(LLM)会产生幻觉,难以完全应用到现实生活各个领域(尤其是医疗领域),以及没有高质量的LLM幻觉评估数据集及相应的LLM幻觉程度评估的问题,提出在医疗问答领域中的LLM幻觉识别与优化方法。首先,根据公开数据集Huatuo,结合GPT-4生成问题答案和人工标注的形式构建医疗问答领域LLM幻觉评估数据集;其次,基于所构建的幻觉评估数据集,定义“幻觉率”的概念,通过设计prompt让待测模型回答“是”或“否”的方式测试和量化各个LLM的幻觉程度,并发现LLM的“YES MAN”幻觉现象;再次,采用低幻觉率的大模型GPT-4作为LeaderAI来提供先验知识辅助高幻觉率LLM进行判断;最后,为探究多个不同LLM是否会在同一个问题上犯错,定义“幻觉碰撞”的概念,并基于概率统计方法揭示不同LLM在医疗问答领域的幻觉碰撞情况。实验结果表明,引入LeaderAI的方法可以提升高幻觉率LLM的表现,使LLM能够以低幻觉率应对医疗问答领域的“YES MAN”幻觉现象,并且目前的LLM同时在一个问题上出现幻觉(发生碰撞)的概率较低。

关键词: 大语言模型, 幻觉识别, 幻觉率, 幻觉碰撞, 模型优化

Abstract:

Focusing on problems that Large Language Models (LLMs) may generate hallucinations and are difficult to be fully applied to various fields of real life, especially medical field, as well as there is no high-quality LLM hallucination evaluation dataset and corresponding LLM hallucination degree evaluation, a method for identifying and optimizing LLM hallucinations in medical question answering field was proposed. Firstly, based on the publicly available dataset Huatuo, an LLM hallucination evaluation dataset in medical question answering field was constructed by combining GPT-4 generated question answers and manual annotation. Secondly, based on the constructed hallucination evaluation dataset, the concept of “hallucination rate” was defined. By designing prompts for the models to be tested answering “yes” or “no”, the degree of hallucination of each LLM was tested and quantified, and the “YES MAN” hallucination phenomenon of LLM was discovered. Thirdly, a low hallucination rate LLM, GPT-4, was used as LeaderAI to provide prior knowledge to assist LLMs with high hallucination rate in making judgments. Finally, to explore whether multiple different LLMs will make mistakes on the same problem, the concept of “hallucination collision” was defined, and based on probability statistical method, the hallucination collision situations of different LLMs in medical question answering field were revealed. Experimental results show that the introduction of LeaderAI can improve the performance of LLMs with high hallucination rate, so that LLMs can handle with the “YES MAN” hallucination phenomenon in medical question answering with low hallucination rate. Moreover, the current LLMs have a low probability of having hallucinations on a single question (collisions).

Key words: Large Language Model (LLM), hallucination recognition, hallucination rate, hallucination collision, model optimization

中图分类号: