This project is a Retrieval-Augmented Generation (RAG) AI chatbot that can answer questions over uploaded PDFs.
- Upload multiple PDFs
- Search across documents
- Get answers grounded in the documents
- Track conversation history per PDF
- See sources for each answer
- ✅ Upload PDFs and manage multiple documents
- ✅ Ask questions about uploaded PDFs
- ✅ Multi-PDF chat memory
- ✅ Source citations for each answer
- ✅ Fully deployable with Docker
- LLM: Ollama LLaMA 3
- Framework: LangChain
- Embeddings: HuggingFace Sentence Transformers
- Vector DB: Chroma
- Backend: FastAPI
- Frontend: Streamlit
- Deployment: Docker
rag-chatbot/
│
├── backend/
│ ├── backend.py
│ ├── requirements.txt
│
├── frontend/
│ ├── frontend.py
│ ├── requirements.txt
│
├── uploads/ # Folder for uploaded PDFs (auto-created)
├── backend.log # Generated by logging (auto-created)
├── Dockerfile
└── README.md
cd backend
pip install -r requirements.txt
uvicorn backend:app --reloadcd frontend
pip install -r requirements.txt
streamlit run frontend.pydocker build -t rag-chatbot .
docker run -p 8000:8000 -p 8501:8501 rag-chatbot- Open the frontend in your browser
- Upload a PDF (or multiple PDFs)
- Select a PDF from the sidebar
- Ask questions; answers appear with chat history visible
- Switch PDFs anytime using the sidebar
- See sources for each answer
Note: Chat history is saved per PDF while the session is running. Backend logs are saved in
backend.log.