Open source AI content verification
Project description
TruthCheck ๐
Open source AI content verification. Score claims 0-100 and trace their origins.
The Problem
AI chatbots retrieve content from the web and present it as fact. Bad actors exploit this by creating fake articles designed to fool AI systems โ effectively laundering misinformation through "trusted" AI interfaces.
Example: BBC journalist Thomas Germain demonstrated he could make ChatGPT and Google's AI tell users he's "the best tech journalist at eating hot dogs" โ by publishing a single fake article on his personal website.
The Solution
TruthCheck provides two powerful tools:
1. verify โ Score claims 0-100
$ truthcheck verify "Thomas Germain is the best tech journalist at eating hot dogs" --llm gemini --deep
Claim: Thomas Germain is the best tech journalist at eating hot dogs
TruthScore: 0/100 (FALSE)
Score Breakdown:
Publisher Credibility: 41/100 (30%)
Content Analysis: 2/100 (30%)
Corroboration: 0/100 (20%)
Fact-Check: 20/100 (20%)
โ ๏ธ ZERO FLAG: Content identified as satire
Evidence:
โข ๐จ Content identified as satire
โข โ ๏ธ Self-published: tomgermain.com publishes claims about its own subject
โข ๐ญ Satire detected: tomgermain.com
2. trace โ Find the origin and propagation
$ truthcheck trace "Thomas Germain is the best tech journalist at eating hot dogs"
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLAIM TRACE RESULT โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ Thomas Germain is the best tech journalist at eating ho... โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฏ ORIGIN (First Source)
Domain: tomgermain.com
Date: 2026-02-05
URL: https://tomgermain.com/hotdogs.html...
๐
TIMELINE
๐ฅ [2026-02-05] tomgermain.com
โโ The Best Tech Journalists at Eating Hot Dogs...
๐ฅ [2026-02-18] bbc.com
โโ I hacked ChatGPT and Google's AI...
๐ฅ [2026-02-18] gizmodo.com
โโ You Can Hack ChatGPT to Become the World's Best...
๐ PROPAGATION
tomgermain.com โโโถ bbc.com
[โโโโโโโโโโ] 85%
tomgermain.com โโโถ gizmodo.com
[โโโโโโโโโโ] 72%
๐ STATS
Sources found: 14
With dates: 8
Date range: 2026-02-05 โ 2026-02-19
Top domains: tomgermain.com, bbc.com, gizmodo.com
Features
- ๐ฏ TruthScore 0-100 โ Clear, weighted credibility score
- ๐ Origin Tracing โ Find where a claim started and how it spread
- ๐ 8,974 Publishers โ Auto-synced from Media Bias/Fact Check
- ๐จ Zero Flags โ Auto-detect satire, fake experiments, self-published
- ๐ฆ Free Search โ DuckDuckGo by default (no API key needed)
- ๐ MCP Server โ Works with Claude Desktop, Cursor
- ๐ฐ Low Cost โ Local embeddings for similarity, LLM optional
Quick Start
Installation
pip install truthcheck
For trace functionality (local similarity):
pip install truthcheck[trace]
CLI Usage
# Verify a claim (TruthScore 0-100)
truthcheck verify "Some claim" --llm gemini --deep
# Trace claim origin (no LLM needed)
truthcheck trace "Some claim"
truthcheck trace "Some claim" --quick # Fast (5 sources)
truthcheck trace "Some claim" --deep # Thorough (30 sources)
# Check a URL
truthcheck check https://example.com/article
# Look up publisher reputation
truthcheck lookup breitbart.com
Python API
from truthcheck import verify_claim, trace_claim
from truthcheck.search import DuckDuckGoProvider
# Verify a claim (TruthScore 0-100)
result = verify_claim(
"Earth is flat",
search_provider=DuckDuckGoProvider(),
deep_analysis=True
)
print(f"TruthScore: {result.truthscore}/100")
print(f"Evidence: {result.evidence}")
# Trace a claim (find origin)
result = trace_claim("Some viral claim")
print(f"Origin: {result['origin']['domain']} ({result['origin']['date']})")
print(f"Timeline: {len(result['timeline'])} sources")
How TruthScore Works
Scoring Formula (0-100)
| Factor | Weight | What It Measures |
|---|---|---|
| Publisher Credibility | 30% | Is the source in MBFC? Trust rating? |
| Content Analysis | 30% | Does it make sense? Red flags? |
| Corroboration | 20% | Do reputable sources confirm? |
| Fact-Check | 20% | What do fact-checkers say? |
Zero Flags (Automatic Score = 0)
These patterns force TruthScore to 0:
| Flag | Meaning |
|---|---|
| ๐ญ Satire | Content is humor/parody |
| ๐งช Fake Experiment | Deliberately fake to test AI |
| ๐ฌ Entertainment | Not meant as fact |
| ๐ค AI-Generated | Synthetic misinformation |
| โ ๏ธ Self-Published | Subject publishes own claims |
Score Interpretation
| Score | Label | Meaning |
|---|---|---|
| 0 | FALSE | Zero flag triggered |
| 1-24 | LIKELY FALSE | Strong evidence against |
| 25-49 | UNCERTAIN | Mixed evidence |
| 50-74 | POSSIBLY TRUE | Some support |
| 75-100 | LIKELY TRUE | Strong support |
URL Verification
from truthcheck import verify
result = verify("https://reuters.com/article/...")
print(result.trust_score) # 0.85
print(result.recommendation) # TRUST / CAUTION / REJECT
Publisher Database
Includes 8,974 publishers from Media Bias/Fact Check:
$ truthcheck lookup reuters.com
Publisher Found:
Name: Reuters
Trust Score: 0.85
Bias: center
Fact Check Rating: very-high
Configuration
# LLM for deep analysis (pick one)
GEMINI_API_KEY=... # Google Gemini (recommended)
OPENAI_API_KEY=sk-... # OpenAI
ANTHROPIC_API_KEY=... # Anthropic Claude
# Search (optional - DuckDuckGo works without key)
BRAVE_API_KEY=... # Brave Search
SEARXNG_URL=http://localhost:8080 # Self-hosted
MCP Server (Claude Desktop, Cursor)
truthcheck-mcp
{
"mcpServers": {
"truthcheck": {
"command": "truthcheck-mcp"
}
}
}
Project Structure
truthcheck/
โโโ src/truthcheck/
โ โโโ verify.py # URL verification
โ โโโ trace.py # verify_claim() and trace_claim()
โ โโโ similarity.py # Local embeddings for trace
โ โโโ propagation.py # Build propagation tree
โ โโโ visualize.py # ASCII visualization
โ โโโ publisher_db.py # 8,974 publishers from MBFC
โ โโโ search.py # DuckDuckGo, Brave, SearXNG
โ โโโ llm.py # Gemini, OpenAI, Anthropic, Ollama
โ โโโ cli.py # Command-line interface
โโโ tests/
Philosophy
- Scores over verdicts โ 0-100 is clearer than TRUE/FALSE
- Trace over trust โ Show the origin, not just a verdict
- Evidence over summaries โ Show why, not just what
- Open over proprietary โ Verification is a public good
License
MIT License.
Acknowledgments
- Media Bias/Fact Check โ Publisher database
- Thomas Germain / BBC โ Hot dog experiment inspiration
Questions? Open an issue
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file truthcheck-0.2.1.tar.gz.
File metadata
- Download URL: truthcheck-0.2.1.tar.gz
- Upload date:
- Size: 287.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d804f070bd98265909518b8c7d88e05295d32cc2e7d72aaff72276986795ddce
|
|
| MD5 |
13bc3ab79cff7d9317f6d22b06c9fffb
|
|
| BLAKE2b-256 |
e17c4844f8e15768213548177fceed2889130e94a85d3e818a3cfdfa22e7142d
|
File details
Details for the file truthcheck-0.2.1-py3-none-any.whl.
File metadata
- Download URL: truthcheck-0.2.1-py3-none-any.whl
- Upload date:
- Size: 283.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
597e3c7322e67fe27f2e5e254eb5f3b872f431d25f25bd78de9e6c6a93817057
|
|
| MD5 |
667176e88d85c20906023b54231a8bef
|
|
| BLAKE2b-256 |
a444e3f032a3a508a04985ecaff5546953cf04fdf7b3a2e7e3c0699b98e1ed13
|