UFO: a Unified and Flexible Framework for Evaluating Factuality of Large Language Models

Zhaoheng Huang, Zhicheng Dou, Yutao Zhu, Ji-Rong WenarXiv 2024 · DOI

Introduction

As Large Language Models (LLMs) are increasingly integrated into critical workflows, the challenge of "hallucinations"—the generation of factually incorrect yet plausible-sounding text—remains a significant hurdle. Existing evaluation metrics often struggle with task-specific rigidity, reliance on static or outdated knowledge sources, and a lack of understanding regarding the substitutability of different evidence types.

To address these limitations, we present UFO (Unified and Flexible framework for factuality evaluatiOn), a modular pipeline designed to assess LLM factuality across diverse tasks. UFO breaks down model outputs into atomic "fact units" and verifies them against a flexible sequence of sources, including search engines, reference documents, and internal LLM knowledge.

The UFO Framework

The UFO framework is built upon three primary LLM-based modules, typically powered by state-of-the-art models like GPT-3.5-turbo.

The UFO evaluation pipeline architecture.
  1. Fact Unit Extraction (FUE): Rather than evaluating entire sentences, which may contain multiple claims, UFO segments text into atomic fact units. For each unit, it generates an entity-centric question-answer pair and associated keywords.
  2. Fact Source Verification (FSV): This module serves as the flexible core of the framework. UFO can be configured to query multiple sources in a prioritized sequence (e.g., reference documents $\rightarrow$ web search $\rightarrow$ internal knowledge). An Answer Extraction (AE) sub-module identifies the ground truth within these sources.
  3. Fact Consistency Discrimination (FCD): The final module compares the model’s original claim against the extracted truth. It assigns a binary score (1 for consistent, 0 for inconsistent) to each fact unit, which is then aggregated into a final UFO Factuality Score.

Experimental Setup

UFO's performance was validated across six datasets representing five distinct tasks:

  • Open-domain QA: Natural Questions (NQ).
  • Web Retrieval-based QA: HotpotQA.
  • Expert-Validated QA: TruthfulQA.
  • News Fact Generation: CNN/DM and Multi-News.
  • Retrieval-Augmented QA: MS MARCO.

The framework utilizes four primary fact sources: Human-written evidence ($S_{he}$), Reference documents ($S_{rd}$), Search engine results ($S_{se}$), and LLM knowledge ($S_{lk}$).

Key Insights

Source Substitutability

A critical finding of this research is the high degree of interchangeability between reference documents and human-written evidence in retrieval-augmented tasks. This suggests that automated, model-retrieved documents can serve as a cost-effective alternative to expensive human labels for evaluation purposes.

News Generation Nuance

In news summarization tasks, human-written summaries are often too concise to verify the granular details generated by LLMs. In these scenarios, search engine results and internal LLM knowledge were found to provide superior discriminative power compared to traditional "gold standard" human evidence.

Results and Efficiency

UFO demonstrates significant improvements over both traditional and advanced metrics.

Discriminative power curves across six datasets.
  • Discriminative Power: UFO consistently outperformed metrics like BLEU, ROUGE, BERTScore, and QAGS in distinguishing the factuality levels of different LLMs.
  • Human Correlation: The framework achieved higher Pearson and Spearman correlation coefficients than existing LLM-based baselines like FacTool and FactScore.
  • Operational Efficiency: UFO is notably more efficient than FactScore, reducing token consumption by approximately 10% and total processing time by 20%.

In comparative testing, ChatGPT generally exhibited higher factuality scores than Bing Chat (in precise mode) and significantly outperformed open-source models such as LLaMA-7b.

Conclusion and Future Work

UFO provides a scalable and adaptable solution for the ongoing challenge of LLM hallucination detection. While currently a post-hoc evaluation tool dependent on a "judge" model, future developments may include integrating UFO scores into the training loop (e.g., via RLHF) to proactively reduce hallucinations during model development.

Summary updated

BibTeX
@misc{huang2024ufo,
  author = {Zhaoheng Huang and Zhicheng Dou and Yutao Zhu and Ji-Rong Wen},
  title = {{UFO: a Unified and Flexible Framework for Evaluating Factuality of Large Language Models}},
  year = {2024},
  eprint = {2402.14690},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.14690},
}
Figure