Practical overview
When it fits
Use FacTool when you have a prompt and generated response to assess in one of its four supported task categories and can provide the API keys required for that category.
Who it is for
- Developers evaluating factuality in language-model responses.
- Researchers assessing generated answers, code, mathematical reasoning or scientific references.
Documented uses
- Assess claims and response-level factuality in knowledge-based answers.
- Detect execution errors in generated code and calculation errors in mathematical reasoning.
- Identify hallucinated scientific literature in generated reviews.
Requirements & limits
The repository identifies the project as open source under the Apache-2.0 license.
- An OpenAI API key is required for all supported task categories.
- Knowledge-based QA also needs a Serper API key; scientific literature review also needs a Scraper API key.
- The documented foundation-model options are GPT-3.5-turbo and GPT-4.
- The repository provides both a Python package installation route and developer installation instructions.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare inputs for a FacTool evaluation
Structure prompts and generated responses for one of the four supported evaluation categories.
Before you start
- Python
- An OpenAI API key
- A Serper API key for knowledge-based QA
- A Scraper API key for scientific literature review
Steps
Install the package with the command below, or use the repository's developer installation instructions.
pip install factoolSet
OPENAI_API_KEY; also setSERPER_API_KEYfor knowledge-based QA orSCRAPER_API_KEYfor scientific literature review.Create input records with
prompt,responseand acategoryvalue ofkbqa,code,mathorscientific.For code-generation inputs, include
entry_pointwith the function name of the code snippet.
Expected outcome
Inputs are organized in the format FacTool's quick start describes for its evaluation workflow.
Guide limitations
- This guide covers installation and input preparation only; it does not describe running an evaluation.
- The OpenAI key is required for every task, while Serper and Scraper API keys apply only to their respective categories.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- GAIR-NLP/factool · Official homepage title · retained in its source language

