Skip to content

It implements a Retrieval-Augmented Generation (RAG) pipeline to create a LangChain documentation chatbot helper

Notifications You must be signed in to change notification settings

grilo13/rag-documentation-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LangChain Documentation Helper

This project is based on a Udemy course but has been enhanced with new features and a restructured architecture to create a LangChain documentation chatbot.

It implements a Retrieval-Augmented Generation (RAG) pipeline, using a Milvus vector database for efficient document retrieval.

It features:

  • Document Ingestion: Embeds and stores documents in Milvus for retrieval
  • Custom API Backend (FastAPI): Handles LLM context interaction and document retrieval
  • Next.js + Assistant UI: A chat interface for user interaction, integrating real-time streaming responses from the LLM

Assistant UI Example

Description

Streamlit Example

Description

Tech Stack

Frontend: Streamlit, Next.js (assistant-ui react library for AI chat)

Server Side: LangChain, FastAPI

Vectorstore: Milvus

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

URI: URI for the Milvus vector store

COLLECTION: collection to store and retrieve documents

OPENAI_API_KEY

Run Locally

Clone the project

  git clone https://github.com/grilo13/rag-documentation-helper.git

Go to the project directory

  cd documentation-helper

Download LangChain Documentation

  cd backend
  mkdir langchain-docs
  wget -r -A.html -P langchain-docs  https://api.python.langchain.com/en/latest

Install dependencies

  poetry install

Insert the documents in the Milvus Vector Store

  python ingestion.py

For simple chat retrieval example using Streamlit:

Start the flask (streamlit) server

  streamlit run streamlit_app.py

For complex usage using Next.js + AssistantUI and FastAPI app:

Run API (on localhost:8000)

  cd backend/app/
  python main.py

Install Next.js dependencies

npm install

And run Next.js app (on localhost:3000)

  cd frontend
  npm run dev

๐Ÿ”— Links

linkedin

About

It implements a Retrieval-Augmented Generation (RAG) pipeline to create a LangChain documentation chatbot helper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published