A tool for analyzing Wikipedia articles to detect various forms of bias and verify factual accuracy through automated source checking.
WikiBias analyzes Wikipedia pages by:
- Detecting 15+ types of textual bias (loaded language, framing bias, missing context, etc.)
- Verifying claims against their cited sources by scraping and analyzing the actual content
- Evaluating source quality, diversity, and clustering
- Generating bias and factuality scores with detailed explanations
- Clone the repository and install dependencies:
pip install -r requirements.txt- Configure your environment:
cp .env.sample .envEdit .env to set up your LLM provider:
- For local LLM: Set
LOCAL=Trueand configureAPI_BASE(e.g., for LM Studio) - For OpenAI: Set
LOCAL=Falseand add yourOPENAI_API_KEY
Analyze a Wikipedia article:
python main.py "Stalin" --max-paragraphs 1Options:
--max-paragraphs N: Limit analysis to first N paragraphs (currently max 1)
The tool generates a comprehensive JSON report including:
- Paragraph-level bias findings and source analyses
- Overall bias score (0-10)
- Overall factuality score (0-10)
- Political alignment detection
- Detailed explanations for each finding