An LLM + RAG-based evidence verification system that verifies news URLs and viral text claims against real-time reporting from global and regional news sources without relying on a traditional supervised fake-news classifier.
When encountering a suspicious claim on social media or browsing the web, users should not have to manually visit multiple news portals one by one.
VerifyNews automates this multi-source investigation:
- Ingests a news article URL or pasted text claim.
- Extracts the core verifiable claim(s) and named entities using Groq LLM.
- Formulates targeted search queries across multiple angles.
- Retrieves real-time news articles from NewsAPI and Google News (SerpAPI).
- Deduplicates cross-publisher syndicated wire stories.
- Indexes & Semantically Searches evidence using FastEmbed (
BAAI/bge-small-en-v1.5) and in-memory cosine similarity search. - Evaluates stance (
SUPPORT,CONTRADICT,NEUTRAL) and context for each retrieved source using Groq LLM. - Synthesizes a transparent verdict:
REAL,FALSE,MISLEADING, orUNVERIFIEDwith evidence snippets and confidence breakdown.
USER INPUT (URL or Text)
│
▼
FastAPI Backend (/api/v1/verify)
│
├─► [If URL] Article Extractor (newspaper3k + bs4)
│
▼
Groq LLM — Claim Extraction (Primary claim, Sub-claims, Entities)
│
▼
Groq LLM — Search Query Generation (3-5 targeted queries)
│
├─────────────────────────┬─────────────────────────┐
▼ ▼ ▼
NewsAPI Search SerpAPI Google News Fallback Store
│ │ │
└─────────────────────────┼─────────────────────────┘
▼
Source Normalization & Wire Deduplication
▼
FastEmbed (384-dim Dense Vectors)
▼
In-Memory Semantic Vector Index
▼
Semantic Evidence Retrieval (Top-K)
▼
Groq LLM — Stance & Nuance Analysis (SUPPORT / CONTRADICT / NEUTRAL)
▼
Groq LLM — Final Verdict & Transparent Synthesis
│
▼
REAL / FALSE / MISLEADING / UNVERIFIED
│
▼
Interactive Single-Page UI
REAL: Multiple authoritative retrieved sources independently confirm and support the central claim.FALSE: Authoritative retrieved evidence directly contradicts or refutes the central claim.MISLEADING: The claim contains partial truth but has missing context, exaggerates numbers, or presents outdated events as current.UNVERIFIED: Retrieved evidence is insufficient, inconclusive, or completely neutral.
- Python 3.10+
- Free Groq API Key
- Free NewsAPI Key
- (Optional) SerpAPI Key
git clone https://github.com/jaiyan-th/Fake-News-Detecter.git
cd Fake-News-Detecter
# Install dependencies
pip install -r requirements.txtCreate a .env file in the project root:
GROQ_API_KEY=your-groq-api-key
NEWS_API_KEY=your-news-api-key
SERPAPI_KEY=your-serpapi-key-optional# Start FastAPI backend & UI
uvicorn backend.main:app --reload --port 8000Open your browser at:
- Interactive UI: http://localhost:8000
- Swagger / OpenAPI Documentation: http://localhost:8000/docs
- System Health Diagnostics: http://localhost:8000/api/v1/health
Verify a news URL or text claim.
Request Body:
{
"url": "https://reuters.com/world/india/example-article",
"text": null
}Response (200 OK):
{
"verdict": "REAL",
"confidence": 88,
"confidence_label": "Verification Confidence",
"claim": {
"primary_claim": "India launched new solar energy initiative.",
"secondary_claims": [],
"entities": ["India", "Solar Mission"],
"timeframe": "Recent"
},
"summary": "Multiple reputable sources confirm the government announcement.",
"explanation": "Reuters and The Hindu both report that the cabinet approved the solar outlay today.",
"evidence_summary": {
"supporting": 2,
"contradicting": 0,
"neutral": 1,
"total_sources_evaluated": 3
},
"sources": [
{
"source_name": "Reuters",
"domain": "reuters.com",
"title": "Cabinet Clears Solar Plan",
"url": "https://reuters.com/...",
"stance": "SUPPORT",
"relevance_score": 0.94,
"evidence_snippet": "The government approved the funding.",
"credibility_tier": "WIRE_AND_PRIMARY_AGENCY"
}
],
"source_agreement_percentage": 100.0,
"limitations": [
"Analysis based on English-language articles available at query time."
],
"pipeline_stages": [
{ "stage": "article_extraction", "status": "COMPLETED", "duration_ms": 350 },
{ "stage": "claim_extraction", "status": "COMPLETED", "duration_ms": 480 },
{ "stage": "multi_source_search", "status": "COMPLETED", "duration_ms": 1100 },
{ "stage": "semantic_vector_retrieval", "status": "COMPLETED", "duration_ms": 120 },
{ "stage": "verdict_synthesis", "status": "COMPLETED", "duration_ms": 650 }
],
"processing_time_ms": 2700
}python -m pytest backend/tests/ -vMIT License. Created for AI-powered news verification and claim investigation.