Long-form factuality in large language models
Jerry Wei, Chengrun Yang, Xinying Song, Yifeng Lu, Nathan Hu, Jie Huang, Dustin Tran, Daiyi Peng, Ruibo Liu, Da Huang, Cosmo Du, Quoc V. Le
arXiv:2403.18802 · 2026-07-27 공개 · arXiv · PDF
llm-agents llm-evaluation benchmarking gpt-4 fact-checking long-form-factuality safe-evaluator search-augmented
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.
한국어 요약
한 줄 요약
GPT-4를 기반으로 생성된 LongFact 데이터셋과 SAFE 평가기법을 통해 대형 언어 모델의 장문 응답 정확도를 체계적으로 평가한다.
핵심 기여도
- GPT-4를 사용해 38개 주제, 2,280개 질문으로 구성된 LongFact 데이터셋 생성.
- Google Search API와 LLM을 결합한 SAFE 평가기법 제안, 16,000개 사실에 대해 72%의 인간 평가자와 일치.
- F1@K 메트릭 제안, 정확도(정밀도)와 응답 길이(재현률)를 균형 있게 평가.
- 13개 모델(4개 모델 가족)을 LongFact에서 평가, 모델 크기와 장문 정확도가 비례함을 확인.
핵심 아이디어
기존 평가 방법은 짧은 응답에 초점을 맞추었으나, 실제 응용에서는 장문의 정확한 응답이 필수적이다. 본 연구는 GPT-4를 활용해 LongFact라는 대규모 장문 평가 데이터셋을 생성하고, SAFE라는 새로운 평가 기법을 제안한다. SAFE는 LLM을 사용해 응답을 개별 사실로 분해하고, Google Search API를 통해 각 사실의 정확도를 검증한다. 이는 단순히 모델 내부 지식을 기반으로 하는 것이 아니라 외부 지식과의 일치 여부를 평가하는 방식이다. 또한, F1@K 메트릭은 정밀도와 재현률을 균형 있게 평가하며, 사용자의 선호 길이(K)를 고려해 장문 응답의 전체 정확도를 측정한다.
기술적 접근법
- **LongFact 생성**: GPT-4(gpt-4-0613)를 사용해 38개 주제, 2,280개 질문 생성.
- **SAFE 평가기법**: gpt-3.5-turbo-0125와 Serper API를 활용.
- 응답 분해 → 개별 사실 추출 → Google Search 쿼리 → 검증 → F1@K 계산.
- **F1@K 메트릭**: 정밀도(지원된 사실 비율)와 재현률(사용자 선호 길이 K 대비 제공된 사실 비율)을 결합.
- **모델 벤치마크**: Gemini, GPT, Claude, PaLM-2 가족의 13개 모델 평가.
주요 결과
- SAFE는 16,000개 사실에서 72%의 인간 평가자와 일치, 100개 분쟁 사례 중 76%에서 우승.
- SAFE는 인간 평가자 대비 20배 저렴.
- LongFact에서 13개 모델 평가 결과, 모델 크기와 장문 정확도가 비례.
- F1@K 메트릭을 통해 정밀도와 재현률을 균형 있게 평가 가능.
의의 및 한계
본 연구는 장문 응답의 정확도를 측정하는 체계적인 프레임워크를 제시하며, SAFE는 인간 평가자보다 정확하고 저렴한 자동 평가 기법으로 입증되었다. LongFact는 다양한 도메인에서 장문 평가를 위한 첫 번째 데이터셋으로, 모델 개선과 평가 기준 설정에 기여할 수 있다. 그러나 SAFE는 Google Search API에 의존하며, 검색 결과의 질에 따라 평가 정확도가 변동할 수 있는 한계가 있다. 또한, 모델 내부 지식 기반의 hallucination 평가 방법은 여전히 미비하다.
실용적 활용
SAFE는 대규모 모델 평가, 모델 개선, 사용자 맞춤형 응답 길이 설정 등에 활용 가능하다. LongFact는 모델 개발자와 연구자들이 장문 응답의 정확도를 체계적으로 평가할 수 있는 기준이 될 수 있다. 특히, 콘텐츠 생성, 고객 지원, 교육 등 장문 응답이 필요한 산업에서 유용하게 사용될 수 있다.