How adityardy05/truthlensai works
TruthLens verifies claims submitted as text, images, or URLs, returning a verdict with confidence, justification, recommendations, and supporting evidence. The web app and Telegram bot are separate entry points; the backend service normalizes inputs, retrieves evidence, and runs the Team B judgment graph. Retrieval combines live web results with historical indexed records and ranks evidence using relevance, domain credibility, and recency. The README describes the LIAR dataset rather than this application; sampled excerpts do not expose API route internals or the full judgment graph wiring, so those links are kept conservative.
Main entry points: graph.py Judgment graph · verification_service.py Verification service · retriever.py Retrieval pipeline · web_retriever.py Web search and scraping
Components 25
User entry points
- Web interface
frontend/js/app.js - Web API client
frontend/js/api.js - Telegram bot
bot/main.py - Bot handlers
bot/handlers.py - Backend client
bot/backend_client.py
Verification backend
- Flask application
backend/app.py - Verification API
backend/api/verification.py - Verification service
backend/services/verification_service.py - Article extraction
backend/services/url_extraction.py - OCR and language
backend/preprocessing/image_ocr.py
Evidence retrieval
- Retrieval pipeline
backend/rag/retriever.py - Web search and scraping
backend/rag/web_retriever.py - Historical claim index
backend/rag/retriever.py - Domain credibility
backend/rag/domain_credibility.py
Claim judgment
- Judgment graph
backend/agents/team_b/graph.py - Claim decomposition
backend/agents/team_b/nodes/decompose_claim.py - Evidence QA rounds
backend/agents/team_b/nodes/round1_qa.py - Credibility check
backend/agents/team_b/nodes/credibility_check.py - Confidence gate
backend/agents/team_b/nodes/confidence_gate.py - Final judgment
backend/agents/team_b/nodes/final_judgment.py - LLM client
backend/agents/llm_client.py
Other components
- Claim submitter
- Tavily search
- Article websites
- Ollama model service
Connections 23
- Claim submitter → Web interface: submits claim
- Web interface → Web API client: requests verification
- Claim submitter → Telegram bot: sends text or photo
- Telegram bot → Bot handlers: dispatches message
- Bot handlers → Backend client: sends verification
- Backend client → Verification API: posts claim or image
- Flask application → Verification API: registers routes
- Flask application → Verification service: creates service
- Verification service → Article extraction: extracts article text
- Verification service → OCR and language: processes image or language
- Verification service → Retrieval pipeline: retrieves evidence
- Verification service → Judgment graph: runs judgment graph
- Retrieval pipeline → Web search and scraping: searches live web
- Web search and scraping → Tavily search: queries
- Web search and scraping → Article websites: scrapes articles
- Retrieval pipeline → Historical claim index: searches records
- Retrieval pipeline → Domain credibility: scores source domains
- Judgment graph → Claim decomposition: dispatches stage
- Judgment graph → Evidence QA rounds: dispatches QA
- Judgment graph → Credibility check: dispatches check
- Judgment graph → Confidence gate: dispatches gate
- Judgment graph → Final judgment: dispatches verdict
- LLM client → Ollama model service: requests generation