FacTool

A task- and domain-agnostic framework for factuality detection of LLM-generated text.
Ask this paper
General framework: Unifies factuality detection across knowledge QA, code generation, math reasoning, and scientific literature review under a common pipeline.
Tool-augmented verification: Calls external tools (search engines, code executors, math solvers) to verify claims rather than relying on the LLM's internal judgment alone.
Benchmark release: Releases an accompanying benchmark dataset plus a ChatGPT plugin implementation for hands-on experimentation.
Practical fact-checking: Provided one of the first end-to-end fact-checking frameworks suitable for deployment alongside LLM chatbots.
Abstract
The emergence of generative pre-trained models has facilitated the synthesis of high-quality text, but it has also posed challenges in identifying factual errors in the generated text. In particular: (1) A wider range of tasks now face an increasing risk of containing factual errors when handled by generative models. (2) Generated texts tend to be lengthy and lack a clearly defined granularity for individual facts. (3) There is a scarcity of explicit evidence available during the process of fact checking. With the above challenges in mind, in this paper, we propose FacTool, a task and domain agnostic framework for detecting factual errors of texts generated by large language models (e.g., ChatGPT). Experiments on four different tasks (knowledge-based QA, code generation, mathematical reasoning, and scientific literature review) show the efficacy of the proposed method. We release the code of FacTool associated with ChatGPT plugin interface at https://github.com/GAIR-NLP/factool .