CoolFace
Apppublic

chanderbawa1983/factual-feed

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
App README

The Factual Feed - AI-Driven News Summary & Verified Trivia Engine

An AI-powered application that aggregates recent news, generates concise summaries, and creates factually verified trivia games with <1% hallucination rate.

Features

  • —News Aggregation: Fetches top breaking news from reliable sources
  • —AI Summarization: Generates concise 3-5 sentence summaries
  • —Verified Trivia: Creates trivia questions with strict anti-hallucination measures
  • —Interactive Interface: Streamlit-based web application
  • —Factual Integrity: Source sentence validation for all trivia answers

Setup

  1. 1.Install Dependencies:
bash
   pip install -r requirements.txt
   python -m spacy download en_core_web_sm
  1. 1.Configure API Keys:
  2. 2.Copy .env.example to .env
  3. 3.Add your OpenAI API key
  4. 4.Add your News API key (get from https://newsapi.org/)
  1. 1.Run the Application:
bash
   streamlit run app.py

Architecture

Phase 1: News Ingestion & Preprocessing

  • —News aggregation from reliable APIs
  • —Text cleaning and preprocessing
  • —Named Entity Recognition (NER) using spaCy

Phase 2: AI Processing

  • —Abstractive summarization using LLM
  • —Extractive trivia generation with prompt engineering

Phase 3: Verification Layer (Critical)

  • —Source sentence validation
  • —Anti-hallucination checks
  • —Distractor generation

Phase 4: User Interface

  • —News summary presentation
  • —Interactive trivia gameplay
  • —Feedback with source citations

Success Metrics

  • —Hallucination Rate: <1% (measured by manual audit)
  • —Latency: <5 seconds per article set
  • —Engagement: Successful trivia completion rates

Project Structure

factual-feed/
├── app.py                 # Streamlit application
├── processing.py          # Core processing engine
├── ai_validator.py        # Verification and anti-hallucination layer
├── news_aggregator.py     # News ingestion module
├── trivia_generator.py    # Trivia creation and validation
├── prompt_templates.py    # LLM prompt templates
└── utils.py              # Utility functions