Inspiration In today's digital age, we're constantly bombarded with news from countless sources, yet we often find ourselves trapped in echo chambers - only seeing perspectives that align with our existing beliefs. During the 2024 US elections and ongoing global conflicts, I noticed how the same event was reported drastically differently across media outlets. This led me to wonder: What if we could automatically see multiple perspectives on any news story, with AI helping us identify objective facts versus controversial opinions?

When Google announced the Chrome Built-in AI Challenge, I saw the perfect opportunity to build a solution that runs entirely on-device, ensuring privacy while providing unbiased multi-source analysis.

What it does Multi News Analysis is a Chrome extension that automatically appears when you visit any news article. It:

  1. Aggregates Related Articles: Searches 10+ news sources (NewsAPI + EventRegistry) covering US, European, Chinese, Middle Eastern, and Russian media
  2. Translates Non-English Content: Uses Chrome's Translator API to translate Chinese, Arabic, and Russian articles to English in real-time
  3. Extracts Objective Facts: Leverages Chrome's Prompt API (Gemini Nano) to identify facts supported by 2+ independent sources
  4. Identifies Controversies: Highlights disagreements between sources with representative quotes
  5. Privacy-First: All AI processing happens locally on your device using Chrome's built-in Gemini Nano model

The sidebar displays:

  • ✅ Objective Facts(with evidence count and expandable source citations)
  • ⚠️ Controversies(with side-by-side quotes from different perspectives)
  • 🌍 Region & Language Filters (customize which sources you want to see)

How we built it Tech Stack:

  • Frontend: React + TypeScript + Tailwind CSS
  • Build Tool: Vite with custom Chrome Extension plugins
  • Extension: Manifest V3 with Service Worker
  • AI: Chrome Built-in APIs (Prompt API + Translator API)
  • News APIs: NewsAPI.org (English sources) + EventRegistry (Global sources)
  • Cache: chrome.storage.local for performance optimization

Architecture:

  1. Content Script(content/enhanced.ts): Detects news articles using Readability.js, extracts metadata (title, URL, publish time, body text), and mounts the React sidebar
  2. Background Service Worker (background/real.ts): Orchestrates the analysis pipeline:
    • News Aggregator: Parallel queries to NewsAPI + EventRegistry
    • Chrome Translator API: Batch translation of non-English articles
    • Chrome Prompt API: Multi-document consensus analysis using carefully crafted prompts
    • Bias Directory: Media classification (Left/Center/Right/Unknown)
  3. React Panel (panel/): Displays analysis results with collapsible cards, language switchers, and region filters

Key Technical Challenges Solved:

  • Integrated Chrome's new Prompt API with custom JSON schema validation
  • Implemented multi-source deduplication and diversification algorithms
  • Designed prompts for Gemini Nano to output structured JSON with article ID references
  • Optimized bundle size (content.js < 230KB) using dynamic imports and code splitting

Challenges we ran into

  1. Chrome AI API Documentation**: The Built-in AI APIs are very new (released in Chrome Canary 127+), with limited examples. I had to experiment extensively with:

    • Flag configurations (#optimization-guide-on-device-model, #prompt-api-for-gemini-nano)
    • Model download timing (5-10 minute wait on first launch)
    • API capabilities checks (window.ai.languageModel.capabilities())
  2. Gemini Nano Output Consistency: The on-device model sometimes returned malformed JSON or hallucinated article IDs. Solution: Implemented robust parsing with fallback logic and explicit prompt instructions to use real article IDs.

  3. Language Detection & Translation: Chrome Translator API requires explicit source/target language pairs. I built a regex-based language detector for Chinese/Arabic/Russian/Japanese/Korean.

  4. Extension Manifest V3 Constraints: Service Workers don't support localStorage or synchronous APIs. Migrated all storage to chrome.storage.local and made everything async.

  5. News API Rate Limits: Free tiers are limited (100 requests/day for NewsAPI, 2000/month for EventRegistry). Implemented aggressive caching with TTL to minimize redundant requests.

Accomplishments that we're proud of ✅ First Chrome Extension to Combine Prompt + Translator APIs**: Successfully integrated two different Chrome AI APIs in a production-ready extension

✅ Real Multi-Source Analysis: Not just aggregation - the extension actually analyzes articles to find consensus facts and disagreements

✅ Privacy-First Design: Zero data sent to external AI servers. All processing happens on-device using Gemini Nano.

✅ Polished UI/UX: Clean, modern sidebar with smooth animations, collapsible cards, and intuitive filters (built from scratch, no UI libraries)

✅ Global Coverage: Successfully integrated English + Chinese + Middle Eastern + Russian media sources with real-time translation

What we learned

  1. On-Device AI is the Future: Chrome's Built-in APIs prove that powerful AI doesn't need cloud servers. Gemini Nano (1.5-2GB model) runs surprisingly fast on consumer hardware.

  2. Prompt Engineering Matters: Crafting effective prompts for Gemini Nano required many iterations. Key learnings:

    • Be explicit about output format (JSON schema)
    • Provide concrete examples
    • Instruct the model to use actual article IDs (not generate fake ones)

What's next for Multi-Source News Analysis 🚀 Short-term (Next 2 Weeks):

  • Add Chrome **Summarizer API for article TL;DR generation
  • Implement Rewriter API for simplifying complex articles
  • Record comprehensive demo video
  • Submit to Chrome Web Store

📈 Medium-term (Next 3 Months):

  • Support more languages (Spanish, French, German, Japanese)
  • Add RSS feed support for custom news sources
  • Implement user feedback mechanism ("Was this analysis helpful?")
  • Add media bias explanations (why is source X classified as Left/Right?)

🌟 Long-term Vision:

  • Browser extension for Firefox, Safari (using WebExtensions API)
  • Mobile app version (React Native)
  • Open-source the bias directory for community contributions
  • Partner with fact-checking organizations (Snopes, PolitiFact)
  • Research paper on "Multi-Source News Consensus Using On-Device AI"

Ultimate Goal: Become the go-to tool for anyone who wants to understand complex news events from multiple perspectives, helping combat misinformation and polarization at scale.

Built With

Share this project:

Updates

Submission history