A full-stack application that allows users to upload PDF documents and chat with them using RAG (Retrieval-Augmented Generation). The application uses Google's Gemini Pro model for generation and Qdrant for vector storage.
-
- PDF Upload: Upload and index PDF documents.
-
- Interactive Chat: Chat with your documents using natural language.
-
- RAG Pipeline: Uses LangChain and Google Generative AI embeddings.
-
- Modern UI: Built with React and Vite, featuring dark mode and Markdown support.
-
- Fast Backend: Powered by FastAPI.
- Frontend: React, Vite, Axios, React Markdown
- Backend: FastAPI, Uvicorn, Python
- AI/ML: Google Gemini (via
google-genai), LangChain - Vector DB: Qdrant (Docker)
- Python 3.10+
- Node.js & npm
- Docker Desktop (for Qdrant)
- Google API Key
git clone https://github.com/parthpatidar03/RAG-Based-Pdf-Chatbot.git
cd RAG-Based-Pdf-ChatbotEnsure Docker is running, then start the Qdrant container:
docker-compose up -dNavigate to the root directory and install dependencies:
pip install -r requirements.txtCreate a .env file in the root directory and add your Google API key:
GOOGLE_API_KEY=your_api_key_here
Start the backend server:
python -m uvicorn server:app --reloadThe backend will run at http://localhost:8000.
Navigate to the frontend directory:
cd frontend
npm installStart the development server:
npm run devThe frontend will run at http://localhost:5173.
- Open the frontend URL.
- Upload a PDF file using the "Upload PDF" button.
- Once processed, type your questions in the chat box and send!