ragbot / README.md
mothy-08
Setup automatic deployment to Hugging Face
b7a91d5
|
Raw
History Blame Contribute Delete
2.39 kB
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