An agentic AI pipeline that takes a plain-text claim, searches for evidence, and returns a credibility score from 0–100 with a justification.
This is the preferred order to solve the issues, as it keeps the fixes incremental and easier to validate step by step.
- Issue 1
- Issue 2
- Issue 3
- Issue 4
- Issue 5
- Issue 6
$ poetry run python -m fact_checker_bugs.cli check "The Great Wall of China is visible from space."
╭──────────────────────────────────────────────────────────────╮
│ Evaluating: The Great Wall of China is visible from space. │
╰──────────────────────────────────────────────────────────────╯
⠙ Agent is researching live data...
🟡 Credibility Score: 35/100
╭─ Justification ───────────────────────────────────────────────╮
│ Multiple scientific sources, including NASA astronaut reports │
│ and optical physics analysis, confirm that the wall is far too │
│ narrow (~10 m) to be seen by the naked eye from low Earth │
│ orbit (~400 km). This is a well-documented myth... │
╰───────────────────────────────────────────────────────────────╯
Sources Consulted
┌──────────────────────────┬──────────────────────────────┐
│ Title │ URL │
├──────────────────────────┼──────────────────────────────┤
│ NASA Earth Observatory │ https://earthobservatory... │
│ Scientific American │ https://scientificamerican.. │
└──────────────────────────┴──────────────────────────────┘
Before setting up the project, make sure you have the following installed:
| Tool | Version | Download |
|---|---|---|
| Python | >= 3.14 | https://www.python.org/downloads/ |
| Poetry | >= 2.0.0 | https://python-poetry.org/docs/#installation |
| Git | Any recent version | https://git-scm.com/downloads |
python --version
poetry --version
git --versiongit clone <repository-url>
cd fact_checker_bugspoetry installCopy the example file:
cp .env.example .envOn Windows PowerShell:
Copy-Item .env.example .envFill in your keys in .env:
GEMINI_API_KEY_1=your_key_here
GEMINI_API_KEY_2=optional_second_key
TAVILY_API_KEY=your_tavily_keyDo not commit
.envto version control.
poetry run python -m fact_checker_bugs.cli check "Your claim goes here"Example:
poetry run python -m fact_checker_bugs.cli check "The James Webb Space Telescope was launched in 2021."fact_checker_bugs/
├── .env.example
├── .gitignore
├── pyproject.toml
├── poetry.lock
├── README.md
├── src/
│ └── fact_checker_bugs/
│ ├── __init__.py
│ ├── cli.py
│ ├── graph.py
│ ├── state.py
│ ├── nodes/
│ │ ├── __init__.py
│ │ ├── cross_referencer.py
│ │ ├── query_formulator.py
│ │ ├── retriever.py
│ │ └── scorer.py
│ └── utils/
│ ├── __init__.py
│ └── llm_utils.py
└── tests/
└── __init__.py
Check that your .env file exists and contains valid keys.
Wait a minute and try again, or add more Gemini keys to rotate between them.
Verify that TAVILY_API_KEY is set correctly in .env.
- LangGraph
- Google Gemini
- Tavily Search
- Typer
- Rich
- Poetry