Real-time claim verification and evidence analysis for streaming information.
TruthStream continuously monitors incoming information streams, extracts factual claims, gathers supporting and contradicting evidence from trusted sources, and generates confidence scores with transparent explanations.
Instead of asking:
"Is this true?"
TruthStream asks:
"What evidence supports this claim, and how strong is that evidence?"
TruthStream is now an MVP backend foundation. It includes:
- A deterministic claim extraction pipeline.
- A pluggable evidence retrieval interface with an in-memory demo retriever.
- Evidence-weighted confidence scoring.
- A FastAPI service with
/healthand/verifyendpoints. - A CLI for local claim verification.
- Automated tests for the core pipeline and API.
The MVP intentionally avoids external model or search dependencies so it can run locally and in CI. Future implementations can replace the extractor and retriever with NLP models, search APIs, stream processors, and persistent storage without changing the public API contract.
Information spreads faster than verification.
News articles, social media posts, blogs, and public announcements can reach millions of people before fact-checkers have time to investigate. TruthStream helps bridge this gap by providing automated, evidence-based verification for information as it appears.
Incoming Text
↓
Claim Extraction
↓
Evidence Retrieval
↓
Confidence Scoring
↓
Explanation Generation
↓
API / CLI Output
Core modules:
truthstream.extraction: deterministic claim and entity extraction heuristics.truthstream.evidence: evidence retriever protocol and in-memory demo retriever.truthstream.scoring: source-credibility and recency weighted confidence scoring.truthstream.pipeline: orchestration layer that composes extraction, retrieval, scoring, and explanation.truthstream.api: FastAPI application.truthstream.cli: command-line entrypoint.
python -m venv .venv
source .venv/bin/activatepip install -e '.[dev]'pytest
ruff check .uvicorn truthstream.api:app --reloadThen verify text:
curl -X POST http://127.0.0.1:8000/verify \
-H 'Content-Type: application/json' \
-d '{"text":"Country X has banned AI systems."}'truthstream "Country X has banned AI systems."[
{
"claim": {
"text": "Country X has banned AI systems.",
"entities": ["Country X", "AI"]
},
"confidence_score": 0.0,
"status": "likely_false",
"supporting_evidence": [],
"contradicting_evidence": [
{
"source": {
"name": "Official Government Registry",
"url": null,
"credibility": 0.95
},
"title": "No nationwide AI ban has been issued",
"snippet": "The registry lists AI safety guidance but no blanket ban on AI systems.",
"stance": "contradicts",
"recency_score": 1.0
}
],
"neutral_evidence": [],
"explanation": "Confidence is 0% based on 0 supporting item(s) from 0 source(s) and 2 contradicting item(s) from 2 source(s)."
}
]TruthStream is not designed to determine absolute truth. Its goal is to provide transparent, evidence-based confidence assessments by continuously analyzing information from multiple independent sources.
Planned capabilities include:
- Multi-language verification.
- Real-time misinformation alerts.
- Stream ingestion using Kafka or equivalent event queues.
- Knowledge graph integration.
- Cross-source contradiction detection.
- Source credibility learning.
- Public API and dashboard.
- Browser extension.
- Research paper support.
MIT License