Skip to main content

Configuration

info

OpenRAG is is currently in public preview. Development is ongoing, and the features and functionality are subject to change.

OpenRAG supports multiple configuration methods with the following priority:

  1. Environment Variables (highest priority)
  2. Configuration File (config.yaml)
  3. Langflow Flow Settings (runtime override)
  4. Default Values (fallback)

Configuration File

Create a config.yaml file in the project root to configure OpenRAG:

# OpenRAG Configuration File
provider:
model_provider: "openai" # openai, anthropic, azure, etc.
api_key: "your-api-key" # or use OPENAI_API_KEY env var

knowledge:
embedding_model: "text-embedding-3-small"
chunk_size: 1000
chunk_overlap: 200
ocr: true
picture_descriptions: false

agent:
llm_model: "gpt-4o-mini"
system_prompt: "You are a helpful AI assistant..."

Environment Variables

Environment variables will override configuration file settings. You can still use .env files:

cp .env.example .env

Required Variables

VariableDescription
OPENAI_API_KEYYour OpenAI API key
OPENSEARCH_PASSWORDPassword for OpenSearch admin user
LANGFLOW_SUPERUSERLangflow admin username
LANGFLOW_SUPERUSER_PASSWORDLangflow admin password
LANGFLOW_CHAT_FLOW_IDID of your Langflow chat flow
LANGFLOW_INGEST_FLOW_IDID of your Langflow ingestion flow
NUDGES_FLOW_IDID of your Langflow nudges/suggestions flow

Ingestion Configuration

VariableDescription
DISABLE_INGEST_WITH_LANGFLOWDisable Langflow ingestion pipeline (default: false)
  • false or unset: Uses Langflow pipeline (upload → ingest → delete)
  • true: Uses traditional OpenRAG processor for document ingestion

Optional Variables

VariableDescription
LANGFLOW_PUBLIC_URLPublic URL for Langflow (default: http://localhost:7860)
GOOGLE_OAUTH_CLIENT_ID / GOOGLE_OAUTH_CLIENT_SECRETGoogle OAuth authentication
MICROSOFT_GRAPH_OAUTH_CLIENT_ID / MICROSOFT_GRAPH_OAUTH_CLIENT_SECRETMicrosoft OAuth
WEBHOOK_BASE_URLBase URL for webhook endpoints
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEYAWS integrations
SESSION_SECRETSession management (default: auto-generated, change in production)
LANGFLOW_KEYExplicit Langflow API key (auto-generated if not provided)
LANGFLOW_SECRET_KEYSecret key for Langflow internal operations

OpenRAG Configuration Variables

These environment variables override settings in config.yaml:

Provider Settings

VariableDescriptionDefault
MODEL_PROVIDERModel provider (openai, anthropic, etc.)openai
PROVIDER_API_KEYAPI key for the model provider
OPENAI_API_KEYOpenAI API key (backward compatibility)

Knowledge Settings

VariableDescriptionDefault
EMBEDDING_MODELEmbedding model for vector searchtext-embedding-3-small
CHUNK_SIZEText chunk size for document processing1000
CHUNK_OVERLAPOverlap between chunks200
OCR_ENABLEDEnable OCR for image processingtrue
PICTURE_DESCRIPTIONS_ENABLEDEnable picture descriptionsfalse

Agent Settings

VariableDescriptionDefault
LLM_MODELLanguage model for the chat agentgpt-4o-mini
SYSTEM_PROMPTSystem prompt for the agentDefault assistant prompt

See .env.example for a complete list with descriptions, and docker-compose*.yml for runtime usage.