Project Story: EchoAI - QuackHacks 2025
Inspiration
In an era defined by filter bubbles and algorithmic echo chambers, we recognized a critical deficit in how people consume news: the lack of immediate, constructive counter-perspectives. We were inspired to build a tool that doesn't just identify bias, but actively solves the problem by instantly synthesizing and presenting the opposing side. Our goal was to facilitate media literacy and bridge political divides by making balanced consumption effortless.
What it does
EchoAI is a powerful Chrome Extension that promotes media balance by analyzing any news article and delivering nuanced analysis and counterpoints directly into a clean sidebar UI.
Key features include:
- Comprehensive Analysis: Using VADER and GDELT for initial sentiment and global tone analysis, alongside Gemini for deeper political and emotional context.
- Bias Visualization: A clear spectrum bar showing the article's political/bias score.
- AI-Powered Counterpoints: Instantly generates a neutral/factual summary and a counter/opposing viewpoint summary using the Gemini API.
- Recommended Readings: Provides links to alternative articles sourced via targeted Google Search queries (e.g.,
<topic> opposing viewpoint).
The extension operates via a Chrome side panel, providing a consistent, non-intrusive experience across all news sites.
How we built it
The system is architected as a robust pipeline focusing on speed and intelligent processing:
- Local Analysis: We implemented VADER and GDELT analysis directly on our server-side component (or locally, if applicable) to provide fast, initial political/emotional scoring and global context.
- AI Orchestration: The
background.jsService Worker manages the data flow. It sends the pre-processed, clean article text to the Gemini API for the complex tasks (summarization, counterpoint generation). - Token Cost Optimization: We implemented local preprocessing, chunking, and keyword filtering before API submission to minimize token usage and latency.
- Opposing View Generation: We use the Gemini API with Grounding/Tool Use (Google Search) to dynamically find, summarize, and return actual, current links to articles presenting an alternative perspective.
The architecture flows from the User Page (extracting text via contentScript.js) through the secure background.js worker, which communicates with the Gemini API, and finally renders the full analysis in the Chrome Sidebar.
Challenges we ran into
Our primary technical hurdle was the integration of the Gemini API for generative tasks:
- Connection Failures (Timeouts): Initial connection attempts for complex Gemini tasks (summaries and link generation) often resulted in timeouts.
- API Key Security: Ensuring the API key was only stored and used within the secure
background.jsservice worker, adhering to Chrome's strict security policies. - Reliable Link Fetching: Getting the LLM to consistently return correctly formatted, live links for opposing articles required careful prompt engineering and forced JSON structured output.
Accomplishments that we're proud of
We are most proud of successfully integrating three complex forms of analysis--VADER, GDELT, and Gemini AI--into a cohesive, functional pipeline. Specifically:
- Holistic Analysis: Creating a seamless fusion of rule-based (VADER), historical/geopolitical (GDELT), and generative (Gemini) analysis for a powerful, multi-faceted bias score.
- Effective Optimization: Implementing smart preprocessing and model selection to manage token costs and ensure the extension remains fast and responsive.
What's next for EchoAI
- Source Credibility Scoring: Implement a separate metric for source reliability, moving beyond political bias.
- Long-Term Caching: Expand local caching (
cache.js) for frequently viewed article summaries to further reduce API calls and improve load times.
Built With
- geminiapi
- javascript
Log in or sign up for Devpost to join the conversation.