metadata
title: RAGBot
emoji: π€
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
license: mit
π€ RAGBOT
A cloud-native, multi-tenant AI chatbot that instantly learns the content of any website and answers questions in real-time. Built for the Cloud Computing final project.
π Key Features
Universal Ingestion: Crawls and indexes any provided URL (e.g., University sites, NGOs, Government portals) on-demand.
SaaS Architecture: Uses Multi-Tenancy via Vector Database Namespacing to isolate customer data within a single index.
RAG Pipeline: Combines Semantic Search (Pinecone) with LLM Generation (Gemini 2.0 Flash) for hallucination-free answers.
Client-Server Model: Decoupled FastAPI Backend and Chrome Extension Frontend.
Asynchronous Processing: Background workers handle heavy scraping tasks without blocking the UI.
π οΈ Tech Stack
Backend (Cloud Engine)
- Framework: FastAPI (Python)
- Vector Database: Pinecone (Serverless AWS)
- LLM: Google Gemini 2.0 Flash
- Crawler: Trafilatura (Sitemap & Content Discovery)
- Embeddings: Sentence-Transformers (
all-MiniLM-L6-v2)
Frontend (Client)
- Interface: Google Chrome Extension (Manifest V3)
- Interaction: Real-time Polling & Dynamic UI
π Project Structure
ragbot/
βββ README.md # Documentation
βββ api/ # π Backend Logic
β βββ config.py # Environment & Logging setup
β βββ crawler.py # Logic for sitemap parsing & scraping
β βββ schemas.py # Pydantic data models
β βββ server.py # Main FastAPI entry point
β βββ utils.py # Security & URL validation
β βββ vectorstore.py # Pinecone batching & management
βββ chrome-extension/ # π§© Frontend Client
β βββ background.js # On-click sidepanel logic
β βββ icons/ # Chrome Extension icons
β β βββ icon128.png
β β βββ icon16.png
β β βββ icon32.png
β β βββ icon48.png
β βββ manifest.json # Setup for Chrome Extension
β βββ sidepanel.css # UI
β βββ sidepanel.html # HTML Contents
β βββ sidepanel.js # Main UI logic
βββ requirements.txt # Python dependencies