https://github.com/trups39/rag-chatbot-using-langchain
Build a production-ready RAG based AI LLM chatbot that can answer questions based on your own documents using Langchain.
https://github.com/trups39/rag-chatbot-using-langchain
fastapi langchain llm openai python rag streamlit
Last synced: 2 months ago
JSON representation
Build a production-ready RAG based AI LLM chatbot that can answer questions based on your own documents using Langchain.
- Host: GitHub
- URL: https://github.com/trups39/rag-chatbot-using-langchain
- Owner: Trups39
- Created: 2024-12-10T22:12:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-19T20:10:20.000Z (over 1 year ago)
- Last Synced: 2025-07-24T10:33:02.168Z (11 months ago)
- Topics: fastapi, langchain, llm, openai, python, rag, streamlit
- Language: Jupyter Notebook
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RAG Chatbot with FastAPI Backend and Streamlit Frontend

## Overview
This project demonstrates how to build a **multi-user RAG chatbot** that answers questions based on your own documents. The system utilizes **LangChain** for the RAG (Retrieval-Augmented Generation) component, **FastAPI** for the backend API, and **Streamlit** for the frontend interface.
This project covers:
- Implementing a **RAG system** using LangChain to combine document retrieval and response generation.
- Processing and storing documents for efficient retrieval in the RAG system.
- Building a **conversational AI** that handles multi-turn interactions.
- **Modularizing the code** for integration with FastAPI, enabling production-grade deployment.
- Creating an interactive **Streamlit frontend** that communicates with the FastAPI backend for real-time data management.
## What’s Built
- **RAG System**: Fundamentals of RAG and how to use LangChain’s models, prompts, and retrievers to create a system that answers document-based questions.
- **FastAPI Backend**: API endpoints for managing document uploads, processing queries, and delivering responses to the frontend.
- **Streamlit Frontend**: An intuitive interface that allows users to interact with the backend for uploading documents and asking questions.

## Prerequisites
Before starting, ensure the following:
- **Python 3.8+** installed on the system.
- **pip** for managing dependencies.
- Basic understanding of **Python**, **FastAPI**, **Streamlit**, and **RESTful APIs**.
- Knowledge of **RAG systems** and **LangChain**.
### Required Packages
The following Python packages are required:
- `fastapi`
- `uvicorn`
- `streamlit`
- `langchain`
- `langchain-openai`
- `langchain-chroma`
- `python-multipart`
- `docx2txt`
- `pypdf`