An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# RAG Chatbot with FastAPI Backend and Streamlit Frontend
RAG_Chatboat

## 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.
langchain2

## 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`