A high-performance Retrieval-Augmented Generation (RAG) chatbot built with FastAPI, LangChain, and FAISS. This system allows users to upload PDF documents and engage in context-aware conversations based on the uploaded data.
- PDF Ingestion: Seamlessly upload and index PDF documents.
- RAG Pipeline: Advanced retrieval using LangChain and FAISS for efficient semantic search.
- Real-time Chat: Interactive web-based chat interface.
- Source Attribution: See exactly which parts of your documents were used to generate answers.
- FastAPI Backend: Robust, typed, and fast API endpoints.
- Backend: FastAPI, Python
- LLM/RAG: LangChain, OpenAI, Sentence-Transformers
- Vector Database: FAISS
- Frontend: Vanilla JS, HTML, CSS (served via FastAPI)
-
Clone the repository:
git clone <your-repo-url> cd chatbot
-
Install dependencies:
pip install -r backend/requirements.txt
-
Configure Environment Variables: Create a
.envfile in the root directory and add your API keys:OPENAI_API_KEY=your_key_here
-
Run the application:
uvicorn backend.main:app --reload
-
Access the Chatbot: Open your browser and navigate to
http://localhost:8000
This project is designed with security in mind. Ensure that your .env file is never committed to version control (already included in .gitignore).