# Long-form factuality in large language models

**Authors:** Jerry Wei, Chengrun Yang, Xinying Song, Yifeng Lu, Nathan Hu, Dustin Tran, Daiyi Peng, Ruibo Liu, Da Huang, Cosmo Du, Quoc V. Le  
**arXiv:** [2403.18802](https://arxiv.org/abs/2403.18802)  
**Date:** 2024-03-27  
**Summary page:** https://www.summarizepaper.com/en/paper/2403.18802v1/

## Key points

- Comprehensive set of 2,280 prompts covering 38 diverse topics
- Proposal of SAFE method for evaluating long-form factuality:
- Leveraging language-model agents to assess model responses
- Breaking down responses into individual facts, refining them for self-containment, evaluating relevance to prompt, and verifying accuracy through Google Search queries
- Use of hyperparameter K to measure preferred response length by users and combining precision and recall in F1@K for evaluation
- Achieves superhuman performance with a 72% agreement with human annotations
- Wins 76% of randomly sampled disagreement cases out of 100
- Cost-effectiveness comparison: SAFE is more than 20 times cost-effective compared to crowdsourced human annotators
- Benchmarking on thirteen models from four model families using LongFact shows that larger language models generally exhibit better long-form factuality
- Future research avenues could explore enhancing language models' long-form factuality through improved pretraining/finetuning or external tool integration
- For further reference and replication purposes, the code for LongFact and SAFE is accessible at https://github.com/google-deepmind/long-form-factuality.

## Summary

In this paper, we delve into the thorough benchmarking of long-form factuality in large language models. We introduce a comprehensive set of 2,280 prompts covering 38 diverse topics called LongFact and propose a method for evaluating long-form factuality known as SAFE. Our approach leverages language-model agents to automatically assess a model's response by breaking it down into individual facts, refining them for self-containment, evaluating their relevance to the prompt, and verifying their accuracy through Google Search queries. We also introduce a hyperparameter K as a measure of preferred response length by users and combine precision and recall in F1@K for evaluation. Our empirical results demonstrate that SAFE achieves superhuman performance by agreeing with human annotations 72% of the time and winning 76% of randomly sampled disagreement cases out of 100. Additionally, SAFE proves to be more than 20 times cost-effective compared to crowdsourced human annotators. Furthermore, we conduct benchmarking on thirteen models from four model families (Gemini, GPT, Claude, PaLM-2) using LongFact and observe that larger language models generally exhibit better long-form factuality. Moving forward, future research avenues could explore enhancing language models' long-form factuality through improved pretraining/finetuning or external tool integration. However,<nl> while our work focuses on factuality concerning world knowledge correctness,<nl> there remains uncertainty in reliably measuring hallucination within long-form settings.<nl> Through our benchmarking efforts,<nl> we aim to demonstrate how robust dataset acquisition methods,<nl> model evaluation techniques,<nl> and metric aggregation can significantly enhance our understanding of language model capabilities in long-form scenarios.<nl> We hope that this work will inspire further research into both assessing and enhancing language models operating in long-form domains.<br>
<br>
<br>
<br>
The code for LongFact and SAFE is accessible at https://github.com/google-deepmind/long-form-factuality for reference and replication purposes.
