πŸ“„ AI Document Search (RAG Chatbot)

Chat with your PDF documents using an AI-powered chatbot.
This project uses Retrieval-Augmented Generation (RAG) so the answers are based on your uploaded files, not just the model’s memory.


✨ Features

  • πŸ“‚ Upload PDF documents for ingestion
  • πŸ”Ž Semantic search with embeddings (finds meaning, not just keywords)
  • πŸ’¬ Ask natural questions and get accurate, context-aware answers
  • πŸ“‘ Source citations from your original documents
  • ⚑ Lightweight Frontend (HTML, CSS, JS) + FastAPI backend
  • 🧠 Powered by Ollama LLM + LangChain
  • πŸ“¦ Vector database with FAISS (local)

πŸ› οΈ Tech Stack

Frontend: HTML, CSS, JavaScript
Backend: FastAPI (Python)
AI Model: Ollama (LLM) + LangChain (retrieval & QA chain)
Vector DB: FAISS (default)
Deployment: Docker (backend), Vercel/Static hosting (frontend)


βš™οΈ How It Works

  1. Upload PDF β†’ Extract text with LangChain loaders
  2. Chunk text β†’ Split into smaller sections for better retrieval
  3. Embed chunks β†’ Convert into vectors using Ollama embeddings
  4. Store vectors β†’ Save in FAISS database
  5. Ask a question β†’ Query is embedded and compared to stored vectors
  6. Retrieve top matches β†’ Most relevant document chunks are selected
  7. Generate answer β†’ Ollama LLM forms a response using retrieved chunks
  8. Return results β†’ Answer is displayed in the chatbot UI

πŸ“‚ Project Structure

Share this project:

Updates