RARR: Researching and Revising What Language Models Say, Using Language Models

Luyu Gao, Zhuyun Dai, Panupong Pasupat, Anthony Chen, Arun Tejasvi Chaganty, Yicheng Fan, Vincent Y. Zhao, Ni Lao, Hongrae Lee, Da-Cheng Juan, Kelvin Guu

Abstract

Language models (LMs) now excel at many tasks such as few-shot learning, question answering, reasoning, and dialog. However, they sometimes generate unsupported or misleading content. A user cannot easily determine whether their outputs are trustworthy or not, because most LMs do not have any built-in mechanism for attribution to external evidence. To enable attribution while still preserving all the powerful advantages of recent generation models, we propose RARR (Retrofit Attribution using Research and Revision), a system that 1) automatically finds attribution for the output of any text generation model and 2) post-edits the output to fix unsupported content while preserving the original output as much as possible. When applied to the output of several state-of-the-art LMs on a diverse set of generation tasks, we find that RARR significantly improves attribution while otherwise preserving the original input to a much greater degree than previously explored edit models. Furthermore, the implementation of RARR requires only a handful of training examples, a large language model, and standard web search.

Introduction: The Hallucination Challenge

Large Language Models (LLMs) like GPT-4 and PaLM have demonstrated remarkable capabilities in generating fluent and contextually relevant text. However, a persistent issue is "hallucination"—the generation of content that is factually incorrect or unsupported by external evidence. This lack of attribution makes it difficult for users to trust model outputs.

While Retrieval-Augmented Generation (RAG) attempts to solve this by providing context before generation, it is not a panacea. Models may still ignore provided sources, and many high-performing models are proprietary "black boxes" without native attribution mechanisms. RARR (Retrofit Attribution using Research and Revision) addresses this by providing a post-hoc solution: a system that can take any model's output and "retrofit" it with factual accuracy and citations.

Overview of the RARR system pipeline.

The RARR Framework: Research and Revision

RARR operates through a modular two-stage pipeline powered by few-shot prompting of a large language model (e.g., PaLM 540B).

1. The Research Stage

The goal of this stage is to find external evidence for every claim made in the original text ($x$).

  • Query Generation (CQGen): Instead of using the entire passage as a search query—which can lead to confirmation bias—RARR prompts an LLM to decompose the text into multiple, specific search queries.
  • Evidence Retrieval: These queries are executed via a standard web search engine. The resulting snippets are ranked by relevance to ensure high-quality evidence.

2. The Revision Stage

Once evidence is gathered, RARR must determine if the original text is supported and, if not, how to fix it.

  • Agreement Model: For each claim-evidence pair, the system uses "question-guided agreement." It asks the LLM to answer the generated search query using both the original text and the retrieved evidence. If the answers differ, the claim is flagged as unsupported.
  • Edit Model: If a claim is unsupported, the LLM is prompted to rewrite the specific span of text. The objective is to align the text with the evidence while minimizing changes to the original model's style, structure, and intent.

Experimental Evaluation

The researchers evaluated RARR across three diverse datasets representing different generation challenges:

  • Natural Questions (NQ): Fact-heavy, short-form statements.
  • StrategyQA (SQA): Multi-step reasoning chains.
  • QReCC: Knowledge-intensive conversational dialogs.

RARR was benchmarked against existing edit models like EFEC (a fine-tuned T5 model) and the internal research/revision loop of LaMDA.

Key Results: Balancing Attribution and Preservation

A critical metric for RARR is the trade-off between Attribution (measured by Attributable to Identified Sources, or AIS) and Preservation (how much of the original text's intent and style is kept).

Attribution vs. Preservation scores across NQ, SQA, and QReCC datasets.

As shown in the results, RARR significantly outperforms baselines in preservation. While models like EFEC often "over-edit"—drastically changing the text to the point of losing the original intent—RARR maintains over 90% intent preservation while still improving factual accuracy. On the NQ dataset, RARR improved attribution from ~35% to 43% and increased overall factual accuracy by approximately 5%.

Discussion and Limitations

RARR demonstrates that you don't need to retrain massive models to make them more reliable. By treating the LLM as a modular component in a research-and-revision pipeline, any model can be retrofitted for truthfulness.

However, challenges remain. The computational cost of multiple calls to a 540B parameter model is high. Additionally, while RARR fixes individual facts, it may not always maintain "global" logical coherence if a fixed fact invalidates a subsequent sentence's logic. Finally, the system's accuracy is bounded by the quality of web search results; it assumes the retrieved evidence is "truth."

Summary updated

Abstract

Language models (LMs) now excel at many tasks such as few-shot learning, question answering, reasoning, and dialog. However, they sometimes generate unsupported or misleading content. A user cannot easily determine whether their outputs are trustworthy or not, because most LMs do not have any built-in mechanism for attribution to external evidence. To enable attribution while still preserving all the powerful advantages of recent generation models, we propose RARR (Retrofit Attribution using Research and Revision), a system that 1) automatically finds attribution for the output of any text generation model and 2) post-edits the output to fix unsupported content while preserving the original output as much as possible. When applied to the output of several state-of-the-art LMs on a diverse set of generation tasks, we find that RARR significantly improves attribution while otherwise preserving the original input to a much greater degree than previously explored edit models. Furthermore, the implementation of RARR requires only a handful of training examples, a large language model, and standard web search.
BibTeX
@inproceedings{gao2023rarr,
  author = {Luyu Gao and Zhuyun Dai and Panupong Pasupat and Anthony Chen and Arun Tejasvi Chaganty and Yicheng Fan and Vincent Y. Zhao and Ni Lao and Hongrae Lee and Da-Cheng Juan and Kelvin Guu},
  title = {{RARR: Researching and Revising What Language Models Say, Using Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.910},
}
Figure