Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📰 News Research Tool

Python Streamlit LangChain License: MIT GitHub stars

An AI-powered news research tool that lets you load news articles from URLs and ask questions about their content using Retrieval-Augmented Generation (RAG). The tool uses advanced NLP techniques to understand and analyze news content, providing insightful answers with proper citations. home page screenshor

✨ Features

📥 Multi-URL Processing

  • Load and analyze multiple news articles simultaneously
  • Automatic HTML parsing and text extraction
  • Smart chunking for optimal context preservation

🤖 AI-Powered Q&A

  • Natural language question answering
  • Context-aware responses using RAG
  • Support for multiple Groq LLM models (Mixtral, Llama 3, Gemma)

🔍 Smart Information Retrieval

  • Semantic search using FAISS vector database
  • Relevant context extraction from documents
  • Configurable similarity search parameters

📚 Transparent Citations

  • Source tracking for every answer
  • Expandable document previews
  • Confidence scoring for retrieved information

Performance & Scalability

  • Fast inference with Groq's LPU technology
  • Persistent vector storage for repeated use
  • Efficient batch processing of multiple articles

🎨 User-Friendly Interface

  • Clean Streamlit-based UI
  • Real-time progress indicators
  • Interactive chat interface
  • One-click sample questions

🛠️ Tech Stack

Component Technology Purpose
Frontend Streamlit Web interface
Backend Python 3.9+ Core logic
AI Framework LangChain LLM orchestration
Vector Database FAISS Similarity search
Embeddings HuggingFace (all-MiniLM-L6-v2) Text vectorization
LLM Provider Groq API Fast inference
Document Loading AsyncHtmlLoader, Html2TextTransformer Web scraping
Text Processing RecursiveCharacterTextSplitter Document chunking

📋 Prerequisites

Before you begin, ensure you have:

  1. Python 3.9 or higher
    python --version
  2. Groq API Key (free at console.groq.com)
  3. Git (for version control)

🚀 Quick Installation

  1. Clone the Repository

     git clone https://github.com/yourusername/news-research-tool.git
     cd news-research-tool
  2. Create Virtual Environment

     python -m venv venv
     source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Set Up Environment Variables Create a .env file in the project root:

    GROQ_API_KEY=your_groq_api_key_here

🎮 Usage

streamlit run src/main.py

🧪 How It Works

  1. Document Processing Pipeline
    URLs → HTML Download → Text Extraction → Chunking → Embeddings → FAISS Index
  2. Query Processing
    User Question → Embedding → Similarity Search → Context Retrieval → LLM Answer Generation
  3. RAG Architecture

The tool implements Retrieval-Augmented Generation (RAG):

  • Retrieval: Finds relevant document chunks using FAISS vector similarity
  • Augmentation: Combines retrieved chunks with the user's question
  • Generation: Uses Groq LLM to generate accurate, context-aware answers

📈 Future Enhancements

  • Support for PDF and DOCX files
  • Batch processing for large article collections
  • Multi-language support
  • Advanced analytics and visualization
  • Topic modeling and trend analysis
  • User authentication and saved sessions
  • API endpoint for programmatic access
  • Integration with news APIs (NewsAPI, GDELT)

📄 License

MIT License

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages