chanderbawa1983/factual-feed
0
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
- Install Dependencies:
pip install -r requirements.txt
python -m spacy download en_core_web_sm- Configure API Keys:
- Copy
.env.exampleto.env - Add your OpenAI API key
- Add your News API key (get from https://newsapi.org/)
- Run the Application:
streamlit run app.pyArchitecture
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