A modern Retrieval-Augmented Generation (RAG) chatbot powered by LangChain, FastAPI, and Streamlit. Upload documents, chat with your data, and get AI-powered answers—all in a user-friendly web app.
Live Preview:
👉 https://langchain-rag-chatbot-frontend.onrender.com/
- Document Upload: Upload PDF, Word, or HTML documents.
- AI-Powered Chat: Chat with your documents using Google’s Generative AI and LangChain.
- Semantic Search: Fast vector search powered by Chroma and Google embeddings.
- Responsive UI: Simple, intuitive Streamlit web interface.
- Cloud-Ready: Easy deployment to Render, AWS, or other platforms.
- Backend: FastAPI (Python) for RESTful API, document processing, and chat logic.
- Frontend: Streamlit (Python) for the web UI.
- Vector Database: Chroma for local vector storage and semantic search.
- LLM: Google Generative AI for generating answers.
- Deployment: Docker and Render for containerized and cloud deployment.
- Python 3.10+
- Docker (optional, for containerized setup)
- Google API Key (for Google Generative AI)
git clone https://github.com/MohammedMusharraf11/LangChain-RAG-Chatbot.git
cd LangChain-RAG-ChatbotCreate a .env file in the root directory:
GOOGLE_API_KEY=your_api_key_here
cd api
pip install -r requirements.txtcd app
pip install -r requirements.txtcd api
uvicorn main:app --host 0.0.0.0 --port 8000cd app
streamlit run streamlit_app.py --server.port=8501 --server.address=0.0.0.0By default, all users share the same document and chat storage. For production or private use, add user authentication and filter data by user or session.
langchain-rag-chatbot/
├── api/
│ ├── main.py # FastAPI backend
│ ├── requirements.txt # Backend dependencies
│ ├── chroma_db/ # Vector database (ignored in git)
│ ├── rag_app.db # SQLite database (ignored in git)
│ └── ... # Other backend files
├── app/
│ ├── streamlit_app.py # Streamlit frontend
│ ├── requirements.txt # Frontend dependencies
│ └── ... # Other frontend files
├── docker-compose.yml # Docker Compose config
├── Dockerfile # (Optional) Frontend Dockerfile
├── .env # Environment variables (ignored in git)
└── README.md # This filePull requests are welcome! For major changes, please open an issue first.