Generating Benchmarks for Factuality Evaluation of Language Models

Dor Muhlgay, Ori Ram, Inbal Magar, Yoav Levine, Nir Ratner +5 more
7/13/2023
cs.CLcs.AI

Official code: AI21Labs/factor (54 stars, MIT, last commit 2023-11-15).

Abstract

Before deploying a language model (LM) within a given domain, it is important to measure its tendency to generate factually incorrect information in that domain. Existing methods for factuality evaluation of LLM generation focus on facts sampled from the LM itself, and thus do not control the set of evaluated facts and might under-represent domain specific or rare facts. We propose FACTOR: Factual Assessment via Corpus TransfORmation, a scalable approach for evaluating LM factuality. FACTOR automatically transforms a factual corpus of interest into a benchmark evaluating an LM's propensity to generate true facts from the corpus vs. similar but incorrect statements. We use our framework to create three benchmarks: Wiki-FACTOR, News-FACTOR and Expert-FACTOR. We show that: (i) our benchmark scores increase with model size and improve when the LM is augmented with retrieval; (ii) benchmark score and perplexity do not always agree on model ranking; (iii) when perplexity and benchmark score disagree, the latter better reflects factuality in open-ended generation, as measured by human annotators. We make our data and code publicly available in https://github.com/AI21Labs/factor.

View on arXivView PDF

Code Implementations(1)

AI21Labs/factorOfficial100%
MIT

Code and data for the FACTOR paper

546PythonJul 13, 20232 years agoMIT

Similar Papers

Cite this paper

@article{muhlgay2023generating,
  title  = {Generating Benchmarks for Factuality Evaluation of Language Models},
  author = {Dor Muhlgay and Ori Ram and Inbal Magar and Yoav Levine and Nir Ratner and Yonatan Belinkov and Omri Abend and Kevin Leyton-Brown and Amnon Shashua and Yoav Shoham},
  year   = {2023},
  eprint = {2307.06908},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.06908v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.06908.svg)](https://codeofpaper.com/paper/2307.06908)

Discussion