ArticleIQ is an AI-driven platform that transforms how you interact with online articles. It provides instant summaries, discovers related content through intelligent web crawling, and offers an interactive AI assistant for deep article explorationβall in one seamless interface. Available both as a web application and a Chrome extension!
When reading articles online, we often need to:
- Quickly understand the main points without reading everything
- Find related content to explore the topic further
- Ask specific questions about the article's content
ArticleIQ solves these challenges by providing all three solutions in a single platform.
- Enter any article URL and get immediate processing
- Clean extraction of relevant content from complex web pages
- AI-powered summaries that capture key points and insights
- Text chunking for efficient processing of long articles
- Automated discovery of semantically related content
- Relevance-based ranking of related articles
- Advanced TF-IDF similarity matching
- Contextual question-answering based on article content
- Real-time conversation via WebSockets
- Powered by LangChain and RAG (Retrieval-Augmented Generation)
- Next.js & React: For a responsive, server-side rendered UI
- TypeScript: For type-safe code and better developer experience
- Tailwind CSS: For elegant, utility-first styling
- WebSockets: For real-time communication with the AI assistant
- Python: Core language for backend services
- Quart: Asynchronous web framework compatible with Flask
- LangChain: For RAG-based conversational AI
- BeautifulSoup: For HTML parsing and content extraction
- Scikit-learn: For TF-IDF vectorization and similarity calculations
- NLTK: For natural language processing tasks
- Transformers: For advanced text summarization with T5
- HTML/CSS/JavaScript: For extension popup interface
- Chrome Extension APIs: For tab interaction and content script communication
- Python server: Shared with the web application for processing requests
- Local storage: For caching article summaries
When a user submits an article URL, ArticleIQ:
- Fetches the HTML content
- Extracts relevant text using BeautifulSoup
- Cleans and preprocesses the content
Two operations occur simultaneously:
- Summarization: Using the T5 transformer model to generate concise summaries
- Web Crawling: Using TF-IDF and cosine similarity to find related content
Once processing is complete:
- Summary is displayed in the summary panel
- Related links are populated in the related articles section
- AI assistant becomes available for questions about the article
-
In-context Analysis
- Navigate to any article page
- Click the ArticleIQ extension icon
- Choose to generate a summary, find relevant links, or both
-
Cached Results
- Previously analyzed pages are cached for faster access
- Results are stored locally in the browser
ArticleIQ/
βββ backend/
β βββ server.py # Main server with API endpoints and WebSockets
β βββ webCrawler.py # Web crawling and content similarity engine
β βββ chatAI.py # LangChain RAG implementation for Q&A
β βββ requirements.txt # Python dependencies
β
βββ frontend/
β βββ app/
β β βββ page.tsx # Main application page
β β βββ layout.tsx # Application layout
β β βββ components/
β β β βββ Chatbot.tsx # AI assistant component
β β β βββ InputSection.tsx # URL input component
β β β βββ RelatedLinks.tsx # Related articles component
β β β βββ Summary.tsx # Article summary component
β βββ lib/
β β βββ api.ts # API client for backend communication
β β βββ types.ts # TypeScript type definitions
βββ chrome-extension/
β βββ manifest.json # Extension configuration
β βββ popup.html # Extension popup UI
β βββ popup.js # Popup functionality
β βββ background.js # Background service worker
β βββ content.js # Content script for page interaction
β βββ styles.css # Extension styling
β βββ assets/ # Icons and images
The backend runs on Quart, an asynchronous Flask-like framework that enables handling multiple concurrent requests. It utilizes:
- Hypercorn for ASGI server implementation with customized configurations for handling long-running tasks
- Server-Sent Events (SSE) for real-time streaming of results
- WebSockets for bi-directional communication with the chatbot
-
Content Extraction:
- BeautifulSoup for parsing and extracting article content
- Smart element selection targeting main content areas (
<article>,<main>, etc.) - Noise removal (navigation, footers, etc.)
-
Text Processing:
- NLTK for sentence tokenization and natural language preprocessing
- Text chunking to handle long articles exceeding model context windows
-
Summarization Engine:
- Leverages the
pszemraj/long-t5-tglobal-base-16384-book-summarymodel - Processes text in chunks using
ProcessPoolExecutorfor parallel processing - Dynamically adjusts chunk size based on model capabilities
- Post-processes summaries for consistency
- Leverages the
The RelevantWebCrawler class implements a sophisticated crawling system:
-
Concurrency Management:
- Asynchronous crawling with
aiohttpfor efficient network operations - Semaphore-based concurrency control (configurable)
- Exponential backoff retry mechanism for temporary failures
- Asynchronous crawling with
-
Content Relevance Analysis:
- TF-IDF vectorization for semantic representation of content
- Cosine similarity calculation between original and discovered content
- Configurable similarity threshold for relevance filtering
- Smart domain limiting to prevent over-crawling a single site
-
Search Optimization:
- Integration with Google Search API for initial seed URLs
- Keyword extraction using KeyBERT to generate effective search queries
- Domain filtering to exclude non-article sources (social media, etc.)
The chatbot leverages LangChain's RAG (Retrieval Augmented Generation) capabilities:
-
Vector Store:
- In-memory vector database using Cohere embeddings (
embed-english-v3.0) - Document chunking with
RecursiveCharacterTextSplitterfor efficient storage
- In-memory vector database using Cohere embeddings (
-
Conversational Memory:
- Maintains conversation history with
ConversationBufferMemory - Contextual question answering based on previous interactions
- Maintains conversation history with
-
LLM Integration:
- Uses Cohere's
command-r-plusmodel for responses - Custom prompting to focus on article-specific information
- Real-time streaming responses through WebSockets
- Uses Cohere's
The extension leverages Chrome's Extension API to:
-
Extract Page Content:
- Content scripts access the DOM to extract HTML
- Background script communicates with the Python backend
-
Process and Display:
- Sends extracted content to the same backend used by the web app
- Displays summaries and related links in a clean popup interface
- Caches results for previously visited pages
- Python 3.9+
- Node.js 16+
- npm or yarn
# Clone the repository
git clone https://github.com/VoidVampire/ArticleIQ.git
cd ArticleIQ/backend
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set environment variables for API keys
export COHERE_API_KEY="your_cohere_api_key" # Required for the chatbot
export LANGCHAIN_TRACING_V2="true" # Optional for debugging
# Start the server
python server.py# Navigate to frontend directory
cd ../frontend
# Install dependencies
npm install
# Run development server
npm run dev# In Chrome, navigate to chrome://extensions/
# Enable "Developer mode"
# Click "Load unpacked"
# Select the chrome-extension directory- Open your browser and navigate to
http://localhost:3000 - Enter the URL of an article you want to analyze
- Click "Analyze Article" and wait for processing to complete
- Explore the summary and related articles
- Ask questions about the article in the AI assistant panel
- Navigate to any article page you want to analyze
- Click the ArticleIQ extension icon in your browser toolbar
- Click "Generate Both" for complete analysis, or choose specific features
- View the summary and related links in the popup
- CPU Processing: The system is currently optimized for CPU processing, which may result in slower processing times for large articles. For production use, GPU acceleration is recommended.
- API Limitations: The current implementation uses Cohere's free tier API, which may affect the quality and speed of RAG responses. For optimal performance, consider upgrading to a paid tier or using alternative high-performance language models.
- Extension vs Web App: The Chrome extension provides convenient in-context analysis but has a more streamlined feature set compared to the full web application. The web app includes the AI assistant feature which is not available in the extension.
ArticleIQ - https://www.youtube.com/watch?v=uFFhW8tb8XI