FacTool is an open-source framework from GAIR-NLP for detecting factual errors in text generated by large language models such as ChatGPT. Published on GitHub under the Apache-2.0 license with about 936 stars and last updated in 2024, it comes from a published research paper and includes a public factuality leaderboard. As generative AI writes more of the world’s text, FacTool tackles the obvious follow-up problem: checking whether what the model wrote is actually true.
FacTool is a tool-augmented framework: rather than asking one model to grade another in a vacuum, it verifies claims with external evidence and tools, following a claim-extraction and verification pipeline. It supports four tasks out of the box. For knowledge-based QA it detects factual errors in answers; for code generation it catches execution errors; for mathematical reasoning it checks calculation errors; and for scientific literature reviews it flags hallucinated references. The repository also ships a ChatGPT plugin configuration and hosts resources for Halu-J, an open model for critique-based hallucination judging, making it useful both as a runnable tool and as research infrastructure.
FacTool’s design reflects a key insight from the research: different kinds of errors need different kinds of evidence. A wrong citation is caught by searching the scholarly record, a wrong calculation by recomputing it, and a broken program by running it โ so the framework routes each claim type to an appropriate verification tool. The accompanying factuality leaderboard tracks how major chatbots perform under this scrutiny, which has made FacTool a reference point in the hallucination-evaluation literature.
FacTool is completely free and open source under the Apache-2.0 license.
Researchers evaluating hallucination and factuality, and product teams who need automated checks on model outputs before answers, code, or citations reach users.