Skip to content

Latest commit

 

History

History
executable file
·
73 lines (51 loc) · 2.61 KB

RAG.md

File metadata and controls

executable file
·
73 lines (51 loc) · 2.61 KB

✨ Retrieval Augmented Generation (RAG)

Basic
Open In Colab

Advanced

Flowise

Flowise is an open source low-code tool for developers to build customized LLM orchestration flow & AI agents. You can find more details.

Step 1: Establish The Necessary Network

docker network create --driver bridge retrieval-augmented-generation

Step 2: Prepare the Embeddings and LLM service.

Prepare the embeddings and model YAML file at the current working directory. These file can be found in the deployment/LocalAI which is bge-m3.yaml and LLaMa3-8b-WangchanX-sft-Demo.yaml. Then run the following command for create service

docker build -t localai -f deployment/LocalAi/Dockerfile.LocalAi .
docker run -d -it --network retrieval-augmented-generation --gpus '"device=0"' -p 8080:8080 --name localai-service localai

Step 3: Prepare Retriever service.

Run the following command for create service

 docker run -d --network retrieval-augmented-generation --name chroma-db -p 8000:8000 chromadb/chroma

Run upload.py that can find in Chroma/upload.py for upload embeddings documents to retriever db

python upload.py

Step 4: Prepare Analyze Chatflow service.

Run the following command for create chatflow database service

docker run -d --name langfuse-db --network retrieval-augmented-generation -p 5432:5432 -e POSTGRES_USER=langfuse -e POSTGRES_PASSWORD=WangchanX -e POSTGRES_DB=postgres postgres:14

Run the following command for create chatflow service

docker run -it --network retrieval-augmented-generation -e DATABASE_HOST=langfuse-db -e DATABASE_USERNAME=langfuse -e DATABASE_PASSWORD=WangchanX -e DATABASE_NAME=postgres -e NEXTAUTH_URL=http://localhost:3000 -e NEXTAUTH_SECRET=mysecret -e SALT=mysalt -p 3000:3000 -d --name langfuse-service langfuse/langfuse

Step 5: Create Flowise service.

docker run -d -it --network retrieval-augmented-generation --name flowise-service -e PORT=4000 -e FLOWISE_USERNAME=admin -e FLOWISE_PASSWORD=admin -p 4000:4000 elestio/flowiseai
  • Preview:

Flowise