Back to directory

Long-Form Factuality in Large Language Models

This is the official code release for a research paper on benchmarking long-form factuality in large language models, including a fact-seeking prompt set and an automatic evaluator for long-form model responses.

Long-Form Factuality in Large Language Models

This repository is the official code for the paper Long-form factuality in large language models. It provides LongFact, a set of 2,280 fact-seeking prompts that each require a long-form response, and the Search-Augmented Factuality Evaluator (SAFE), which automatically evaluates a model's long-form responses for factual accuracy. It also implements F1@K, an extension of the F1 score to long-form settings that uses recall based on a human-preferred response length.

An included experimentation pipeline benchmarks OpenAI and Anthropic models by generating responses to the LongFact prompts and then scoring them with SAFE, and separately evaluates SAFE itself against human annotations from FActScore.

It is written in Python, installs into a conda environment from a requirements file, and requires API keys for the model providers being benchmarked.

More in AI evals

See all 269
  • Provenance gate

    github.com

    A deterministic authorization gateway that sits between an AI agent and its tools, tracing where each parameter of a side-effect call came from, and blocking the call or asking a human when the source does not check out.

  • JevBench

    benchmarkheaven.com

    A reproducible benchmark from Benchmark Heaven that ranks Jev-class typed decision models on intelligence, calibration, speed, and cost, with a published harness, scoring rules, and results.

  • A co-evolutionary adversarial red-teaming tool for AI agents that uses quality-diversity evolutionary search to autonomously breed edge-case scenarios, testing whether an agent with tool access can be made to hallucinate, deadlock or leak funds.