✦
Summary
FacTool is an open-source, tool-augmented framework for detecting factual errors in text generated by large language models such as ChatGPT. It is developed by GAIR-NLP and is available on GitHub under the Apache 2.0 licence, with a factuality leaderboard comparing chatbots including GPT-4, ChatGPT, Claude and Bard.
Key Features
Tool-augmented factuality detection for LLM-generated text
Knowledge-based QA factual error detection
Code generation execution error detection
Mathematical reasoning calculation error detection
Scientific literature review hallucination detection
Claim-level and response-level factuality scores with corrections
Factuality leaderboard comparing chatbots
Python package installable via pip install factool
ChatGPT plugin configuration included
Open-source under the Apache 2.0 licence
About Factool
The framework supports four tasks: detecting factual errors in knowledge-based question answering, execution errors in code generation, calculation errors in mathematical reasoning, and hallucinated literature in scientific literature reviews. It breaks responses into claims, generates queries, gathers evidence and returns claim-level and response-level factuality scores with reasoning, errors and corrections, and it also includes Halu-J, an open-source model for critique-based hallucination judging.
FacTool is aimed at researchers and developers evaluating and improving the factual reliability of LLM outputs, and it is installed as a Python package via pip install factool, using OpenAI, Serper and Scraper API keys, with a ChatGPT plugin configuration included.