Configuration
All environment variables for the RAG DB platform
RAG DB is configured entirely through environment variables. This reference covers every variable grouped by subsystem.
| Variable | Required | Default | Description |
|---|
DEV | No | false | Enable development mode (verbose logging, relaxed auth) |
LOG_LEVEL | No | INFO | Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL |
AZURE_TENANT_ID | Yes | — | Azure AD tenant ID for managed identity and service principal auth |
AZURE_CLIENT_ID | Yes | — | Client ID of the user-assigned managed identity or service principal |
AZURE_CLIENT_SECRET | No | — | Client secret (only needed for local development; managed identity is used in production) |
KEYVAULT_NAME | Yes | — | Name of the Azure Key Vault storing application secrets |
SAS_TOKEN_TTL_DAYS | No | 7 | Validity period in days for generated user delegation SAS tokens |
| Variable | Required | Default | Description |
|---|
COSMOSDB_ENDPOINT | Yes | — | Cosmos DB account endpoint URL |
COSMOSDB_ACCOUNT_NAME | Yes | — | Cosmos DB account name |
COSMOSDB_INDEXES_DATABASE | Yes | — | Database containing index data containers |
COSMOSDB_INDEXES_METADATA_DATABASE | Yes | — | Database containing metadata containers |
COSMOSDB_INDEXES_METADATA_CONTAINER | Yes | — | Container for index metadata documents |
COSMOSDB_INDEXES_FILES_CONTAINER | Yes | — | Container for file tracking documents |
COSMOSDB_INDEXES_RUNS_CONTAINER | Yes | — | Container for indexing run records |
COSMOSDB_INDEX_NOTIFICATIONS_CONTAINER | Yes | — | Container for index change notifications |
COSMOSDB_PREFERRED_LOCATIONS | No | — | Comma-separated list of preferred Azure regions for geo-replication reads |
COSMOSDB_CONSISTENCY_LEVEL | No | Session | Consistency level: Strong, BoundedStaleness, Session, ConsistentPrefix, Eventual |
COSMOSDB_RETRY_TOTAL | No | 9 | Maximum number of retries for transient Cosmos DB errors |
COSMOSDB_RETRY_BACKOFF_MAX | No | 300 | Maximum backoff time in seconds between retries |
COSMOSDB_CAPACITY_MODE | No | Serverless | Capacity mode: Serverless or Provisioned |
COSMOSDB_MAX_THROUGHPUT | No | 10000 | Maximum throughput in RU/s (only applies when COSMOSDB_CAPACITY_MODE is Provisioned) |
| Variable | Required | Default | Description |
|---|
SERVICEBUS_NAMESPACE | Yes | — | Azure Service Bus namespace (fully qualified: <name>.servicebus.windows.net) |
SERVICEBUS_SUBSCRIPTION_ID | Yes | — | Azure subscription ID containing the Service Bus resource |
SERVICEBUS_RESOURCE_GROUP | Yes | — | Resource group containing the Service Bus namespace |
DAPR_EVENTS_DISPATCHER_COMPONENT_NAME | Yes | — | Dapr component name for the events dispatcher pub/sub binding |
DAPR_EVENTS_DISPATCHER_QUEUE | No | sbq-events-dispatcher | Service Bus queue name for event dispatching |
DAPR_INDEX_PROCESSOR_COMPONENT_NAME | Yes | — | Dapr component name for the index processor pub/sub binding |
DAPR_SESSIONS_PER_INDEX | No | — | Number of concurrent Dapr sessions per index (controls parallelism) |
DAPR_SESSION_IDLE_TIMEOUT_SEC | No | 360 | Idle timeout in seconds before a Dapr session is released |
| Variable | Required | Default | Description |
|---|
AZURE_OPENAI_ENDPOINT | Yes | — | Azure OpenAI resource endpoint URL |
AZURE_OPENAI_API_KEY | No | — | API key for Azure OpenAI (falls back to managed identity if not set) |
AZURE_OPENAI_API_VERSION | No | 2024-07-01-preview | Azure OpenAI API version |
EMBEDDING_DEPLOYMENT_NAME | Yes | — | Deployment name for the embedding model |
OPENAI_DEPLOYMENT_NAME | Yes | — | Deployment name for the chat/completion model (used for query rewriting) |
VECTOR_SIZE | No | 1536 | Dimension of embedding vectors |
EMBEDDING_VECTOR_SIZE | No | 1536 | Alias for VECTOR_SIZE (either may be used) |
AZURE_OPENAI_WHISPER_MODEL_NAME | No | — | Deployment name for the Whisper speech-to-text model |
| Variable | Required | Default | Description |
|---|
AZURE_DOCINTEL_ENDPOINT | No | — | Azure Document Intelligence endpoint URL |
AZURE_DOCINTEL_KEY | No | — | API key for Azure Document Intelligence |
AZURE_SPEECH_ENDPOINT | No | — | Azure Speech Services endpoint URL |
AZURE_SPEECH_KEY | No | — | API key for Azure Speech Services |
AZURE_SPEECH_REGION | No | — | Azure region for Speech Services (e.g., eastus) |
These variables control the container scaling and processing behavior of the index processor workers.
| Variable | Required | Default | Description |
|---|
INDEX_PROCESSOR_CPU | No | 2 | CPU cores allocated per index processor replica |
INDEX_PROCESSOR_MEMORY | No | 4Gi | Memory allocated per index processor replica |
| Variable | Required | Default | Description |
|---|
INDEX_PROCESSOR_MIN_REPLICAS | No | 0 | Minimum replica count (0 enables scale-to-zero) |
INDEX_PROCESSOR_MAX_REPLICAS | No | 5 | Maximum replica count |
INDEX_PROCESSOR_SCALE_OUT_MESSAGE_COUNT | No | 10 | Number of pending Service Bus messages that triggers a scale-out event |
INDEX_PROCESSOR_POLLING_INTERVAL | No | 5 | Seconds between KEDA polling for queue depth |
INDEX_PROCESSOR_COOLDOWN_PERIOD | No | 600 | Seconds to wait after last scale event before scaling down |
| Variable | Required | Default | Description |
|---|
CHUNK_SIZE | No | — | Target size in characters for each text chunk |
CHUNK_OVERLAP | No | — | Number of overlapping characters between consecutive chunks |
FILE_INDEXING_MAX_RETRIES | No | — | Maximum retries for a single file before marking it as failed |
EMBEDDING_BATCH_SIZE | No | — | Number of chunks sent per embedding API call |
INDEXER_STALE_FILE_TIMEOUT_MINUTES | No | 15 | Minutes after which an in-progress file is considered stale and eligible for retry |