Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedback
Baolin Peng††\dagger Michel Galley††\dagger Pengcheng He††\dagger Hao Cheng††\dagger Yujia Xie††\dagger Yu Hu††\dagger Qiuyuan Huang††\dagger Lars Liden††\dagger Zhou Yu‡‡\ddagger Weizhu Chen††\dagger Jianfeng Gao††\dagger ††\dagger Microsoft Research ‡‡\ddagger Columbia University
Abstract
Large language models (LLMs), such as ChatGPT, are able to generate human-like, fluent responses for many downstream tasks, e.g., task-oriented dialog and question answering. However, applying LLMs to real-world, mission-critical applications remains challenging mainly due to their tendency to generate hallucinations and their inability to use external knowledge. This paper proposes a LLM-Augmenter system, which augments a black-box LLM with a set of plug-and-play modules. Our system makes the LLM generate responses grounded in external knowledge, e.g., stored in task-specific databases. It also iteratively revises LLM prompts to improve model responses using feedback generated by utility functions, e.g., the factuality score of a LLM-generated response. The effectiveness of LLM-Augmenter is empirically validated on two types of scenarios, task-oriented dialog and open-domain question answering. LLM-Augmenter significantly reduces ChatGPT’s hallucinations without sacrificing the fluency and informativeness of its responses. We make the source code and models publicly available.111https://aka.ms/llm-augmenter
中文速览
大型语言模型(LLM)如 ChatGPT 虽能生成流畅自然的回答,却常常"一本正经地胡说八道"(幻觉问题),也无法获取训练数据之外的最新或私有知识。为此,研究者提出了 LLM-Augmenter 系统,在不修改 ChatGPT 任何参数的前提下,为其插入一套"即插即用"模块:先从外部知识库或网页中检索并整合证据,再把证据连同自动生成的事实性反馈一起写入提示词,驱动 ChatGPT 反复自我修正,直到回答通过验证才输出给用户。在客服对话任务中,该系统让 ChatGPT 的"有用性"(衡量回答是否有据可查)提升了 32.3%,"自然度"提升了 12.9%;在需要跨文档多跳推理的开放域问答任务中,答案的事实准确率(F1)也绝对提升了约 10 个百分点。这项工作证明了无需重新训练模型、仅靠外挂模块就能大幅压制幻觉的可行性,为将 LLM 安全部署于真实业务场景提供了一条实用路径。
原文 arXiv:2302.12813;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2302.12813v3