An AI-powered Chrome extension that detects and blocks misinformation in social media feeds, specifically designed to protect senior citizens from AI-generated fake news.
uBlockAI acts as an ad-blocker analog for AI misinformation. It analyzes Instagram posts using OCR (Optical Character Recognition) and AI agents to verify claims against reliable news sources, flagging potentially false information before users engage with it.
- Real-time Analysis: Automatically scans Instagram posts as users scroll through their feed
- OCR Integration: Extracts text from images using Tesseract OCR
- AI-Powered Verification: Multi-agent AI system that verifies claims using web search and credibility scoring
- Misinformation Detection: Generates AI scores, misinformation scores, and detailed reasoning with supporting evidence
- User Control: Allows users to set custom sensitivity parameters for content filtering
- Visual Flagging: Blurs or removes posts flagged as potential misinformation
- Location:
/frontend/extension/ - Manifest: Manifest v3 Chrome extension
- Content Scripts: Injected into Instagram pages to capture posts
- Background Service Worker: Handles communication with backend API
- Popup Interface: User settings and control panel
- Location:
/backend/ - Framework: FastAPI with CORS support
- AI Agents: Backboard-based multi-agent system
- Tools:
- Web Search Tool: Searches alternative news sources
- Credibility Tool: Assesses source reliability
- Numeric Verification: Validates numerical claims
- OCR Processing: Extracts text from images
- JavaScript (ES6+ modules)
- Chrome Extension Manifest v3
- HTML/CSS for popup interface
- Python 3.10+
- FastAPI: Web framework
- Backboard SDK: AI agent orchestration
- Tesseract OCR: Text extraction from images
- BeautifulSoup: Web scraping
- OpenAI GPT / Google Gemini: LLM models
- Python 3.10 or higher
- Tesseract OCR installed on your system
- Chrome browser
- Navigate to the backend directory:
cd backend- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt-
Install Tesseract OCR:
- macOS:
brew install tesseract - Windows: Download from UB Mannheim or official installer
- Linux:
sudo apt-get install tesseract-ocr
- macOS:
-
Create a
.envfile in/backend/app/with your API keys:
BACKBOARD_API_KEY=your_backboard_api_key
- Start the server:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" in the top right corner
-
Click "Load unpacked" and select the
/frontend/extensionfolder -
The extension icon should appear in your Chrome toolbar
-
Navigate to Instagram and the extension will automatically begin analyzing posts
You can test the OCR functionality directly:
python app/post_classifier.py --url "https://instagram.com/p/EXAMPLE" --caption "Example caption" --include-caption- Install the extension following the steps above
- Navigate to Instagram
- Scroll through your feed - posts will be automatically analyzed
- View flagged content: Suspicious posts will be blurred or removed based on your settings
- Adjust settings: Click the extension icon to modify sensitivity thresholds
POST /api/analyze_claims: Analyzes a social media post for misinformation- Request body:
{ "url": "post_url", "caption": "caption_text", "ocr_text": "extracted_text" } - Response:
{ "ai_score": float, "misinformation_score": float, "reasoning": string, "evidence": array }
- Request body:
uBlockAI/
├── backend/
│ ├── app/
│ │ ├── agents/
│ │ │ ├── backboard_agent.py # Main AI agent orchestration
│ │ │ └── prompts.py # LLM prompts
│ │ ├── api/
│ │ │ └── routes.py # FastAPI routes
│ │ ├── tools/
│ │ │ ├── web_search_tool.py # Web search functionality
│ │ │ ├── credibility_tool.py # Source credibility assessment
│ │ │ ├── numeric_verify.py # Numerical claim verification
│ │ │ └── registry.py # Tool registry
│ │ ├── schemas/
│ │ │ ├── agent_io.py # Agent input/output schemas
│ │ │ └── tool_io.py # Tool input/output schemas
│ │ ├── post_classifier.py # OCR-based post classifier
│ │ ├── main.py # FastAPI entry point
│ │ └── TestScript.ipynb # Testing notebook
│ └── requirements.txt
├── frontend/
│ └── extension/
│ ├── manifest.json # Chrome extension manifest
│ ├── background.js # Service worker
│ ├── script.js # Content script for Instagram
│ ├── popup.html # Extension popup UI
│ ├── popup.js # Popup logic
│ ├── crime-scene.png # Warning overlay image
│ └── background.png # Extension background
└── README.md
- Content Capture: The Chrome extension content script monitors Instagram posts
- Image Processing: Post images are captured and sent to the backend
- OCR Extraction: Tesseract OCR extracts text from images
- Claim Analysis: The Backboard AI agent analyzes the caption + OCR text
- Verification: The agent uses web search tools to verify claims against reliable sources
- Scoring: An AI score and misinformation score are calculated
- Response: Results are returned to the frontend
- Flagging: Posts exceeding misinformation thresholds are visually flagged or removed
The main challenge was reducing AI agent response time. We addressed this through:
- Prompt engineering to streamline agent reasoning
- Model selection optimization (balancing accuracy vs. speed)
- Potential for caching common claim patterns
Working with Instagram's dynamic DOM required careful handling of:
- Infinite scroll detection
- Post element identification
- Mutation observers for real-time updates
- Video/Reel Support: Integrate TwelveLabs for video content analysis
- Multi-Platform: Extend support to Facebook, Twitter/X, TikTok
- User Feedback Loop: Allow users to report false positives/negatives
- Offline Mode: Basic fact-checking without API calls
- Senior-Friendly UI: Larger fonts, simplified controls, voice assistance
Built during a hackathon with the goal of protecting vulnerable populations from AI-generated misinformation. The project demonstrates the power of multi-agent AI systems for content verification.
MIT License - Feel free to use and modify for educational and non-commercial purposes.
For questions or contributions, please open an issue in the repository.