Long-form factuality in large language models

📄 arXiv: 2403.18802v4 📥 PDF

作者: Jerry Wei, Chengrun Yang, Xinying Song, Yifeng Lu, Nathan Hu, Jie Huang, Dustin Tran, Daiyi Peng, Ruibo Liu, Da Huang, Cosmo Du, Quoc V. Le

分类: cs.CL, cs.AI, cs.LG

发布日期: 2024-03-27 (更新: 2024-11-07)

备注: NeurIPS 2024; 72 pages, 18 figures, 30 tables. Code at https://github.com/google-deepmind/long-form-factuality

🔗 代码/项目: GITHUB


💡 一句话要点

提出SAFE方法以提升大型语言模型的长文本事实准确性

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 长文本生成 事实准确性 自动化评估 大型语言模型 搜索增强技术

📋 核心要点

  1. 现有大型语言模型在生成开放主题的长文本时,常常出现事实错误,影响其可靠性。
  2. 论文提出的SAFE方法通过将长文本分解为单个事实,并结合搜索引擎验证,提升了事实准确性。
  3. 实验结果显示,SAFE在与人类标注者的比较中,准确率达到72%,且成本比人类标注者低20倍以上。

📝 摘要(中文)

大型语言模型(LLMs)在开放主题的事实查询中常常生成包含事实错误的内容。为此,本文首先利用GPT-4生成了一个名为LongFact的提示集,涵盖38个主题的数千个问题。接着,提出了一种名为搜索增强事实评估器(SAFE)的方法,利用LLM将长文本响应分解为单个事实,并通过多步骤推理过程评估每个事实的准确性。实验表明,SAFE在准确性和成本效益上均优于众包人类标注者,且在对13种语言模型的基准测试中,较大的语言模型通常表现出更好的长文本事实准确性。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在生成长文本时的事实准确性问题。现有方法往往依赖于人类标注者进行评估,效率低且成本高。

核心思路:论文提出的SAFE方法利用LLM自动评估长文本的事实准确性,通过将响应分解为单个事实并使用搜索引擎验证每个事实的支持程度,提升评估的效率和准确性。

技术框架:SAFE的整体架构包括三个主要模块:首先,使用LLM将长文本分解为多个独立的事实;其次,针对每个事实发送搜索查询以获取支持信息;最后,通过多步骤推理判断每个事实的准确性。

关键创新:SAFE的核心创新在于将LLM与搜索引擎结合,形成了一种新的自动化评估机制,显著提高了评估的效率和准确性,区别于传统依赖人类标注的方式。

关键设计:在设计中,SAFE引入了F1分数的扩展作为综合指标,平衡了响应中支持事实的比例(精确率)与相对于用户偏好响应长度的提供事实比例(召回率)。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

实验结果表明,SAFE在对约16,000个独立事实的评估中,与众包人类标注者的意见一致率达到72%。在随机抽取的100个争议案例中,SAFE的胜率为76%。此外,SAFE的成本比人类标注者低20倍以上,显示出其在效率和经济性上的优势。

🎯 应用场景

该研究的潜在应用领域包括自动化内容生成、在线问答系统以及教育领域的智能辅导工具。通过提高长文本的事实准确性,能够显著提升用户体验和信息的可靠性,未来可能对信息检索和知识管理产生深远影响。

📄 摘要(原文)

Large language models (LLMs) often generate content that contains factual errors when responding to fact-seeking prompts on open-ended topics. To benchmark a model's long-form factuality in open domains, we first use GPT-4 to generate LongFact, a prompt set comprising thousands of questions spanning 38 topics. We then propose that LLM agents can be used as automated evaluators for long-form factuality through a method which we call Search-Augmented Factuality Evaluator (SAFE). SAFE utilizes an LLM to break down a long-form response into a set of individual facts and to evaluate the accuracy of each fact using a multi-step reasoning process comprising sending search queries to Google Search and determining whether a fact is supported by the search results. Furthermore, we propose extending F1 score as an aggregated metric for long-form factuality. To do so, we balance the percentage of supported facts in a response (precision) with the percentage of provided facts relative to a hyperparameter representing a user's preferred response length (recall). Empirically, we demonstrate that LLM agents can outperform crowdsourced human annotators - on a set of ~16k individual facts, SAFE agrees with crowdsourced human annotators 72% of the time, and on a random subset of 100 disagreement cases, SAFE wins 76% of the time. At the same time, SAFE is more than 20 times cheaper than human annotators. We also benchmark thirteen language models on LongFact across four model families (Gemini, GPT, Claude, and PaLM-2), finding that larger language models generally achieve better long-form factuality. LongFact, SAFE, and all experimental code are available at https://github.com/google-deepmind/long-form-factuality.