Quickstart Setup
This guide outlines the steps to set up and deploy the RAG system on your server or local machine.
Requirements:
- Python 3.12
- Docker
Configuration & Secrets
The default configuration is located in configuration.default.json. This file configures toy PDF dataset as the document datasource and defines default settings for embedding, augmentation, and evaluation stages. To customize the setup, refer to the configuration Configuration Setup.
Secrets Configuration
Create a secrets file at configurations/secrets.default.env
. Below is a template:
# LLMs
RAG__LLMS__OPENAI__API_KEY=...
# Langfuse
RAG__LANGFUSE__DATABASE__USER=user
RAG__LANGFUSE__DATABASE__PASSWORD=password
RAG__LANGFUSE__SECRET_KEY=...
RAG__LANGFUSE__PUBLIC_KEY=...
RAG__LLMS__OPENAI__API_KEY
: Required for connecting to OpenAI LLM.- Langfuse Keys:
RAG__LANGFUSE__SECRET_KEY
andRAG__LANGFUSE__PUBLIC_KEY
are generated during initialization and will need to be updated later.
Initialization
Python Environment
-
Install uv on your OS following this installation guide.
-
In the root of the project, create a virtual environment and activate it:
uv venv
source .venv/bin/activate
- Install the required dependencies:
uv sync --all-extras
Services Initialization
To initialize the Langfuse and vector store services, run the initialization script:
build/workstation/init.sh --env default
NOTE: Depending on your OS and the setup you might need to give execute permission to the initialization script e.g. chmod u+x build/workstation/init.sh
Once initialized, access the Langfuse web server on your localhost (port defined in configuration.default.json under pipeline.augmentation.langfuse.port
). Use the Langfuse UI to:
- Create a user.
- Set up a project for the application.
- Generate secret and public keys for the project.
Add the generated keys to the configurations/secrets.default.env
file as follows:
RAG__LANGFUSE__SECRET_KEY=<generated_secret_key>
RAG__LANGFUSE__PUBLIC_KEY=<generated_public_key>
Deployment
After completing the initialization, deploy the RAG system using the following command:
build/workstation/deploy.sh --env default
This command sets up and runs the RAG system on your workstation, enabling it for use.