News Credibility Analysis
Relevant source files
The following files were used as context for generating this wiki page:
News Credibility Analysis is a core component of the TrueLens platform designed to evaluate journalistic integrity and detect potential misinformation. The system employs a multi-signal approach, combining linguistic heuristics, transformer-based machine learning models, and external fact-checking databases to assign a trust score to news content.
The scope of this analysis includes identifying sensationalism, emotional manipulation, lack of citations, and clickbait patterns, alongside verifying core claims against established fact-checking organizations like the Google Fact Check Tools API and Wikipedia.
System Architecture
The news analysis process is orchestrated through an asynchronous ML pipeline that processes either raw text or scraped content from a provided URL. The pipeline aggregates various "signals" to form a final verdict.
Data Flow and Orchestration
The following diagram illustrates the lifecycle of a news analysis request from the initial scan submission to the final trust score generation.
The orchestration is handled by the process_scan_task in the Celery worker, which triggers the analyze_news service when news-specific keywords (e.g., "breaking", "sources", "journalist") are detected in the content.
Sources: truelens-backend/app/tasks/ml_pipeline.py:168-175, truelens-backend/app/services/news_analysis.py:126-130
Core Components
1. Heuristic Analysis
The analyze_news_heuristics function evaluates text against several markers of journalistic quality. It uses a penalty-based scoring system where higher scores indicate a higher likelihood of "fake news" or low-quality reporting.
| Heuristic | Indicators Checked | Impact on Score |
|---|---|---|
| Sensationalism | Use of words like "shocking", "bombshell", "hoax", "conspiracy". | +10 to +20 points |
| Clickbait | Phrases like "you won't believe", "what happens next" in the intro. | +25 points |
| Citations | Presence of "according to", "reported", "said", or "study". | -15 (Good) to +25 (None) |
| Emotional Manipulation | Excessive use of ALL CAPS (>5% ratio) or exclamation marks (>3). | +15 points per flag |
Sources: truelens-backend/app/services/news_analysis.py:44-122
2. Machine Learning Pipeline
TrueLens utilizes a fine-tuned transformer model for automated classification.
- Model:
mrm8488/bert-tiny-finetuned-fake-news-detection. - Logic: The model is lazily loaded via
_get_news_pipeline. It processes the first 512 tokens of the text to predict "real" or "fake" labels. - Scoring: A "fake" prediction adds 25 points to the suspicion score, while a "real" prediction subtracts 20 points.
Sources: truelens-backend/app/services/news_analysis.py:18-41, truelens-backend/app/services/news_analysis.py:141-160
3. Fact-Check Integration
The system performs two types of fact-checks to validate specific claims:
- Historical Database: Queries the Google Fact Check Tools API using the core claim (the first sentence of the text).
- Live Evaluation: Uses the
evaluate_claim_livefunction to search Wikipedia and evaluate findings using the Gemini-2.5-flash LLM.
Ensemble Scoring Logic
The final trust score is a weighted average of multiple signals. In the context of news, the "news" signal carries a significant weight in the final calculation.
| Signal Type | Default Weight | Description |
|---|---|---|
text | 0.40 | Stylometry and AI-generation features. |
news | 0.20 | Journalistic integrity and fake news ML signals. |
domain | 0.25 | Credibility of the host domain (e.g., trusted news TLDs). |
provenance | 0.05 | Internet Archive (Wayback Machine) history. |
The trust score is calculated as: 100 - (weighted_average_fake_probability).
Sources: truelens-backend/app/tasks/ml_pipeline.py:42-51, truelens-app/src/lib/analysis.ts:199-205
Domain Credibility Signals
For URL-based news analysis, the system checks for established journalistic domains. Known trusted domains like reuters.com, bbc.com, and nytimes.com receive a +25 point boost to their trust score, while suspicious TLDs like .click or .buzz receive a -20 point penalty.
Sources: truelens-app/src/lib/analysis.ts:133-157
Summary
News Credibility Analysis in TrueLens operates as a multi-layered verification engine. It moves from surface-level linguistic checks (heuristics) to deep semantic understanding (transformer models) and finally to external validation (fact-check APIs). This comprehensive approach ensures that the final trust score reflects both the technical authenticity of the text and the factual reliability of the information presented.