Skip to main content
The RAG (Retrieval-Augmented Generation) application is designed to provide an interactive interface for users to ask questions based on provided documents.

Start the FlexAI endpoints

Create the FlexAI secret that contains your HF token in order to access the inference models:
Start the FlexAI endpoint of the LLM:
Start the FlexAI endpoint of the embedder:

LangSmith (Optional)

Setup

The code of this experiment is located at code/rag and the following commands should be run from this location.

Using Docker

1

Build the Docker image

2

Run the Docker container

Local Setup

1

Install the required dependencies

2

Run the application

Usage

Once the application is running, you can access the Gradio interface in your web browser at http://localhost:7860. You can upload documents and ask questions based on the content of those documents. For examples, you can upload documents located at code/rag/data and ask questions such as
  • What is this demo about?
  • For which workflows LLM agents are useful?
  • Where can I find bioluminescent fungis?

Code

requirements.txt

run_rag.py

Dockerfile

src/rag_pipeline.py

src/reader.py

⚡ Deploy this on FlexAI

Any model, NVIDIA or AMD, live in under 60 seconds. No code changes, no infra management, hardware-agnostic.

Get started →Talk to us