FoRAG: Factuality-optimized Retrieval Augmented Generation for Web-enhanced Long-form Question Answering

Tianchi Cai, Zhiwen Tan, Xierui Song, Tao Sun, Jiyan Jiang, Yunqi Xu, Yinger Zhang, Jinjie Gu · DOI

TL;DR

FoRAG (Factuality-optimized Retrieval Augmented Generation) is a new framework designed to fix the two biggest headaches in long-form question answering: logical incoherence and factual hallucinations. By forcing models to draft an outline before writing and employing a "doubly fine-grained" RLHF framework, the authors produced a 7B-parameter model that outperforms the massive 175B WebGPT in coherence, helpfulness, and factuality.

What Problem Does This Paper Address?

Web-enhanced Long-form Question Answering (LFQA) is the task behind systems like Bing Chat or Perplexity.ai. Unlike simple factoid QA, LFQA requires synthesizing information from multiple web pages into a structured, multi-paragraph response.

However, current systems face two major hurdles:

  1. Logic Gaps: Answers often lack a clear structure, appearing as a "heap of information" rather than a reasoned response.
  2. Factuality Issues: Research shows that only about half of the statements in commercial RAG systems are fully supported by their citations.

Optimizing for factuality is traditionally difficult because human annotation is expensive, and standard Reinforcement Learning from Human Feedback (RLHF) uses a "holistic reward"—a single score for an entire long essay. This creates a sparse reward problem, where the model doesn't know exactly which sentence was the lie that tanked its score.

Methods

The authors propose a two-pronged solution, illustrated in the framework overview below:

Figure 1: Illustrations of the input for LLM in web-enhanced LFQA task (upper left), the existing generator (lower left), our outline-enhanced generator (middle) and our doubly fine-grained factuality optimization method (right). Before generating a long answer, the outline-enhanced generator first drafts an organization pattern and an outline to promote a clear logic for generation. The doubly fined-grained RLHF optimizes factuality by incorporating fine-grained designs on two core steps, i.e. factuality evaluation and reward modeling, with methods on multiple levels of granularities proposed on each step.

1. Outline-Enhanced Generator

Instead of generating an answer in one shot, the model follows a two-stage process:

  • Outline Stage: The model selects an organizational pattern (e.g., "Cause-Effect" or "Compare and Contrast") and drafts a concise outline with 1–5 key points, each mapped to specific retrieved references.
  • Expansion Stage: The model uses the outline as a blueprint to write the final, detailed answer.

2. Doubly Fine-grained RLHF

To solve the sparse reward problem, the authors introduce "double granularity" in the RLHF pipeline:

  • Fine-grained Evaluation: Instead of one score for the whole answer, they use GPT-4 to decompose the answer into sentences and then into subclaims (atomic facts). Each subclaim is checked against the references.
  • Fine-grained Reward Modeling: They train reward models at different levels—sequence-level (scoring sentences) and token-level (assigning credit/blame to specific words). This provides a much denser training signal, telling the model exactly where it went wrong.

Datasets

The authors constructed two large-scale outline-enhanced LFQA datasets by augmenting existing benchmarks:

  • WebGLM-QA (English): ~44k samples.
  • WebCPM (Chinese): ~5.5k samples, plus an additional 39k Chinese samples collected to address language imbalance.

As shown in the paper's statistics, their outline-enhanced answers (Ans. OE) are significantly more detailed and longer than the original datasets.

Key Insights and Ideas

  • Structure as a Prompt: Simply requiring the model to "think" about the organizational structure before writing acts as a powerful logical constraint, significantly boosting coherence.
  • Subclaims are the "Atomic Unit" of Truth: Evaluating at the sentence level is good, but sentences often contain multiple facts. Breaking them into subclaims allows for the most precise factuality optimization.
  • Dense Rewards Beat Scale: The "aha moment" here is that a smaller model (7B) with high-quality, fine-grained feedback can beat a model 24 times its size (175B) that was trained with coarser signals.

Key Results

The authors' model, FoRAG-L-7B (based on Llama-2), achieved state-of-the-art results:

  • Beating the Giants: It outperformed WebGPT-175B across coherence, helpfulness, and factuality metrics on English benchmarks.
  • Factuality Gains: As seen in the main results table, FoRAG models achieved sentence-level factuality scores (Fact/s.) of 0.97–0.98, a significant jump over previous open-source baselines.
Table 3: Performance comparison of the existing web-enhanced RAGs with our FoRAG.
  • Ablation Success: The authors proved that both components are necessary. Outlining primarily boosts coherence and helpfulness, while the fine-grained RLHF specifically targets factuality without hurting the other metrics.

Limitations and Future Work

  • Inference Overhead: The two-step generation process (outline then answer) generates about 10% more tokens, increasing latency. The authors suggest "context distillation" as a potential future fix to bake the outlining logic into a single-step generation.
  • Training Cost: The subclaim-level RLHF is computationally expensive, taking roughly 67% more time to train than standard holistic RLHF.
  • Evaluator Bias: The system relies heavily on GPT-4 for automatic evaluation. While they validated this against human annotators (finding high agreement), the framework is still subject to the underlying biases of the LLM evaluator.

Summary updated

BibTeX
@misc{cai2024forag,
  author = {Tianchi Cai and Zhiwen Tan and Xierui Song and Tao Sun and Jiyan Jiang and Yunqi Xu and Yinger Zhang and Jinjie Gu},
  title = {{FoRAG: Factuality-optimized Retrieval Augmented Generation for Web-enhanced Long-form Question Answering}},
  year = {2024},
  eprint = {2406.13779},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.13779},
}
Figure