Inspiration

We built Poli-Bias AI after noticing how easily biased coverage shapes public opinion. Our team wanted to create a tool that encourages readers to question headlines, spot potential slants, and engage with news more critically. Seeing friends and family wrestle with echo chambers online pushed us to find a practical solution.

What it Does

Poli-Bias AI fetches the latest news articles, then uses a zero-shot AI model to classify each piece as left-, center-, or right-leaning. It displays these results in a simple, color-coded bar, helping readers quickly gauge where each headline might stand on the political spectrum.

How We Built It

  1. Flask Backend

    • Written in Python to host the facebook/bart-large-mnli model for text classification.
    • Receives article text from the front end, returns bias distribution as JSON.
  2. Front End

    • Built with HTML, CSS, and JavaScript.
    • Fetches headlines via NewsAPI.org, sends them to the backend for bias analysis, and renders the results in intuitive bars.
  3. Zero-Shot Classification

    • Leveraged Hugging Face Transformers to perform classification without specialized fine-tuning.
    • Carefully experimented with label phrasing ("Left," "Center," "Right") to minimize ambiguous or "Uncertain" outputs.

Challenges We Ran Into

  • Model Performance: bart-large-mnli can be computationally heavy, so we had to optimize the inference process for timely responses.
  • Label Wording: Small changes in how we named each category significantly affected classification results.
  • Ethical Considerations: Recognizing that no model is perfectly unbiased, we remain transparent about the tool's limitations and encourage users to consider the results alongside other sources.

Accomplishments That We're Proud Of

  • Successfully integrating a large NLP model into a lightweight Flask service.
  • Designing a clean, user-friendly interface that presents bias data at a glance.
  • Demonstrating real-time bias breakdowns for multiple articles within one dashboard.

What We Learned

  • Zero-Shot Nuances: We learned how label choices can drastically influence the model's classification.
  • Team Collaboration: Coordinating data science and web development tasks taught us the importance of clear communication.
  • Practical AI Deployment: Hosting a large model in a hackathon environment drove home the need for efficiency and caching strategies.

What's Next for Poli-Bias AI

  • Fine-Tuning: Collecting domain-specific data to further improve accuracy.
  • Expanded Data Sources: Incorporating more diverse news outlets and potentially other languages.
  • User Feedback Loop: Allowing readers to flag misclassifications, feeding that data back into our system for continuous learning.
  • Deeper Analysis: Exploring sentiment, author-level bias, and time-based trends to give more nuanced insights into political reporting.

Built With

Share this project:

Updates