Emergent Mind

Long-form factuality in large language models

(2403.18802)
Published Mar 27, 2024 in cs.CL , cs.AI , and cs.LG

Abstract

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.
SAFE evaluates the factuality of responses using a language model and Google Search, outperforming humans cost-effectively.

Overview

  • Introduces LongFact to evaluate long-form factuality in LLMs across multiple topics and presents SAFE, a Search-Augmented Factuality Evaluator, for assessing response accuracy.

  • Describes the generation of 2,280 fact-seeking prompts through GPT-4 to cover a broad range of themes for evaluating LLMs across 38 topics.

  • SAFE methodology deconstructs responses into individual facts, assesses their relevance, and verifies accuracy via Google Search API, outperforming human annotators.

  • Benchmarking reveals larger LLMs achieve higher factuality levels, with recent models like GPT-4-Turbo and Gemini-Ultra showing significant improvements in long-form content accuracy.

Introduction

LLMs have become increasingly powerful and versatile in generating human-like text across a wide range of domains. However, ensuring the factual accuracy of their outputs, especially in long-form responses, remains a challenge. Addressing this, we introduce LongFact, a prompt set designed to evaluate long-form factuality in LLMs across diverse topics. Additionally, we present SAFE (Search-Augmented Factuality Evaluator), an automated method utilizing LLMs to evaluate long-form responses by checking individual facts against Google Search results. Through extensive benchmarking of thirteen popular LLMs, including models from the Gemini, GPT, Claude, and PaLM-2 families, we demonstrate the ability of LLMs to achieve superhuman performance in rating long-form factuality at a significantly reduced cost compared to human annotators.

Generation of LongFact

LongFact comprises two task types: LongFact-Concepts and LongFact-Objects, spanning 38 topics from various domains. We employed GPT-4 to generate 2,280 fact-seeking prompts, ensuring a wide spread across themes and requiring responses that contain multiple detailed facts. Our approach yields a rich dataset for evaluating the long-form factuality of LLMs in various domains, addressing the gap in existing benchmarks that either focus on singular factoids or cover a narrow range of topics.

SAFE: Factuality Autorating

To evaluate factuality in long-form responses, we propose SAFE. This method involves using a LLM to deconstruct a response into individual self-contained facts, assess their relevance, and then verify their accuracy by issuing searches to Google Search API and interpreting the results. Through this innovative methodology, we observed that SAFE achieves superior performance compared to human annotators, demonstrating a 72% agreement with crowdsourced annotations and outperforming human judgments in 76% of disputed cases, all while costing significantly less.

F1@K: Evaluating Factuality

Crucial to our analysis is the introduction of $F_1 @ K$, a metric that considers both precision and recall in evaluating factuality. This metric enables a standardized comparison of LLMs by balancing the accuracy of provided facts and the comprehensiveness of the response based on a hyperparameter $K$ that represents the ideal number of supported facts from a user's perspective.

Benchmarking Results

Our extensive benchmarking reveals that larger LLMs tend to achieve higher levels of long-form factuality. The study also highlights variances in performance across different model families, with the most recent models like GPT-4-Turbo and Gemini-Ultra showcasing notable improvements in generating factually accurate, long-form content.

Implications and Future Directions

The insights gained from this research have profound implications for both the theoretical understanding and practical application of LLMs in generating reliable and factually accurate long-form content. The demonstrated effectiveness of SAFE as an automated evaluation method opens new avenues for efficiently scaling the evaluation process for LLMs. Looking ahead, future research could explore optimizing SAFE for broader topic coverage, integrating more nuanced fact-checking methodologies, and refining our $F_1 @ K$ metric to better capture user preferences in factual responses.

In conclusion, our work represents a significant step forward in the evaluation of long-form factuality in LLMs, offering valuable tools and insights for researchers and practitioners aiming to enhance the reliability and factual accuracy of LLM-generated content.

Get summaries of trending AI papers delivered straight to your inbox

Unsubscribe anytime.

YouTube
Reddit
Long-form factuality in large language models (1 point, 0 comments) in /r/hypeurls
Test Your Knowledge

You answered out of questions correctly.

Well done!