vaultspec-rag
Configuration referenceLink to Configuration reference
This page lists every VAULTSPEC_RAG_* environment variable vaultspec-rag declares. It gives the matching command-line interface (CLI) flag where one exists, and the rules for parsing values.
A test in the suite checks every variable name, type, and default on this page against the shipped settings object. Adding, renaming, or re-defaulting a knob fails that test until this page is updated.
Examples use the installed-tool form and call vaultspec-rag directly. If
vaultspec-rag is a project dependency, prefix each command with uv run; see
the installation guide for lane selection, including the
standalone tool and no-install routes.
On this pageLink to On this page
Resolution order - which source wins when more than one sets a value
Type coercion - how values are parsed, and what a rejected value does
Variables with their own parsing rules - the four that resolve differently
Core variables - every variable resolved through the standard chain, grouped by what it affects
Config-only keys - settings with no environment variable
Hugging Face cache - the third-party variables that govern model downloads
Renamed and removed variables - old names and what replaced them
Tuning for memory and speed - task guidance rather than reference
Related guides: the installation guide for where to set variables before first run, the CLI reference for the full flag context, the storage backends guide for the server-first backend model, the architecture overview for the runtime concepts named here, the glossary for the vocabulary, and the preprocessing hooks guide for the .vaultragpreprocess.toml rule format.
Resolution orderLink to Resolution order
Each setting resolves through a fixed precedence, highest first: CLI flag, environment variable, persisted local-only marker, then the built-in default.
The persisted local-only marker applies only to backend selection. It lives at {status_dir}/local-only.json and is written by install --local-only - server start --local-only applies to that run without persisting. A later server start with no flag and no environment variable then still selects the on-disk store.
Four variables sit outside this chain and resolve their values their own way. See Variables with their own parsing rules.
Type coercionLink to Type coercion
The loader parses and validates every value as it builds the settings. It reports a rejected value once, at startup, not when something first reads that setting. One unusable value anywhere makes the whole settings object unbuildable.
Booleans:
1,true,yesandonparse as true;0,false,noandoffparse as false (case-insensitive). These spellings are the same for every boolean vaultspec-rag reads, including the ones in Variables with their own parsing rules - no variable readsoffas on. Any other value is rejected with a message naming the variable and listing the accepted spellings, so a typo such astreuis refused instead of silently reading as false and turning the feature off.Integers and floats: parsed with
int()andfloat(); a non-numeric value is rejected the same way.Paths: relative paths resolve against the project root; absolute paths are used as given. Use forward slashes on Windows.
Empty values: for a setting whose default is a string or a path, an empty or whitespace-only value is treated as unset and falls back to the default. This keeps an unexpanded
VAR="$UNSET"from repointing a managed directory at the working directory. A boolean does not share that protection: an empty value reads as false, so an unexpandedVAR="$UNSET"on a boolean turns that setting off rather than leaving its default in place.VAULTSPEC_RAG_STDIO_WATCHDOGis the single exception, and says why in its own row.
An unset variable falls back to the built-in default.
The four variables in Variables with their own parsing rules resolve at their own call sites. The spellings here still apply to them; only their handling of an empty or unrecognised value differs.
Variables with their own parsing rulesLink to Variables with their own parsing rules
These four do not resolve through the chain in Resolution order. Each is read at its own call site with the rule stated here. VAULTSPEC_RAG_ROOT is not a tuning knob at all: it selects the project every entry point addresses.
The two booleans among them accept the same spellings as every other boolean. They differ only in how they resolve an empty value and a word that spells neither state. The Controls column states each one’s rule and the reason for it.
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
string |
unset |
|
|
|
boolean |
enabled |
Stdio shim self-reap when its spawning process chain breaks. Only an explicit |
- |
|
boolean |
disabled |
Diagnostic memory sampler. Follows the standard boolean rule in full, rejection included: unset and empty leave it off, and an unrecognised word is rejected rather than guessed at |
- |
|
path |
working directory |
The project every entry point addresses when nothing else names one. |
|
Core variablesLink to Core variables
The tables in this section list every VAULTSPEC_RAG_* variable resolved through the standard chain.
Backend selectionLink to Core variables, Backend selection
These variables choose between the supervised Qdrant server (the default) and the on-disk store. They also configure a remote or managed server.
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
boolean |
|
Server-first default backend |
|
|
boolean |
|
On-disk store opt-out; overrides the server default |
|
|
integer |
|
Managed server HTTP port (gRPC binds one below) |
- |
|
string |
none |
Remote or managed server URL; selects server mode in the store |
- |
|
string |
none |
Remote server API key |
- |
|
string |
none |
Operator-supplied binary path (air-gapped escape hatch) |
- |
|
string |
|
Shared multi-root server storage |
- |
|
string |
none |
Vector quantization ( |
- |
|
float |
|
Seconds of no startup progress the supervisor tolerates (total wait is 4x this) |
- |
Project and data locationsLink to Core variables, Project and data locations
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
path |
|
Directory holding the on-disk store and index metadata |
|
|
path |
|
On-disk store subdirectory inside the data dir |
|
|
path |
|
Vault index metadata filename inside the data dir |
- |
|
path |
|
Codebase index metadata filename inside the data dir |
- |
Service runtime and loggingLink to Core variables, Service runtime and logging
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
path |
|
Directory for service status, marker, binary, and log files |
|
|
path |
|
Resident service log filename inside the status dir |
|
|
integer |
|
HTTP service port and MCP fast path |
|
|
string |
|
Root logger level |
|
|
integer |
|
Seconds an idle project slot stays resident before eviction |
- |
|
integer |
|
Maximum simultaneously cached project slots |
- |
|
float |
|
Client connection and read budget for lifecycle and admin calls (seconds) |
- |
|
float |
|
Client budget for |
- |
|
float |
|
How long a pause waits for in-flight work to drain before it refuses (seconds) |
- |
|
integer |
|
Active-file size threshold for each managed log source |
- |
|
integer |
|
Rotated backups retained for each managed log source |
- |
The log policy applies independently to service.log and qdrant.log. With the defaults, each source keeps one active file and five backups. The aggregate budget is approximately 24 MiB.
A generation is sized to match the per-source window the log readers scan back over. Raising VAULTSPEC_RAG_MANAGED_LOG_MAX_BYTES past that window keeps bytes that no vaultspec-rag server logs call, MCP log tool, or jobs interface will return: the readers walk back from the newest record and stop at the window, so the head of an oversized generation is written, rotated, and never read. Prefer raising the backup count to hold more history.
Job lifecycleLink to Core variables, Job lifecycle
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
integer |
|
Maximum simultaneously tracked non-terminal (queued/running) jobs |
- |
|
float |
|
Seconds to drain running jobs during a graceful daemon stop |
- |
Store write resilienceLink to Core variables, Store write resilience
A transient store-write failure (disk pressure, a write-ahead-log stall) is retried with bounded exponential backoff before the operation is abandoned.
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
float |
|
Per-operation deadline before a store write is abandoned |
- |
|
integer |
|
Retry attempts for a transient store-write failure |
- |
|
float |
|
Initial backoff before the first store-write retry |
- |
|
float |
|
Maximum backoff between store-write retries |
- |
Model selectionLink to Core variables, Model selection
The stored vectors belong to the model that produced them. After changing any model here, reindex. If the dense width disagrees with the dense model, the store rejects the first upsert rather than writing silently.
The default sparse model is gated and non-commercial. The
installation guide owns the
access, licensing, error-recovery, and dense-only policy. This page records the knobs:
authenticate downloads with HF_TOKEN or hf auth login, or set
VAULTSPEC_RAG_SPARSE_ENABLED=0 consistently in the service environment and reindex.
Disabling sparse does not disable the dense encoder or reranker, so the service still
requires [gpu] and a supported accelerator. Provisioning, warmup, and readiness all
honour the toggle, so a dense-only install never provisions or probes the gated sparse
repository.
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
string |
|
Dense embedding model id |
- |
|
integer |
|
Dense vector width; must match the dense model |
- |
|
string |
|
SPLADE sparse model id |
- |
|
string |
|
CrossEncoder reranker model id |
- |
Embedding and rerankingLink to Core variables, Embedding and reranking
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
integer |
|
Outer batch size fed to the embedding pipeline |
- |
|
integer |
|
Vault inner encode sub-batch size |
- |
|
integer |
|
Code inner encode sub-batch size |
- |
|
integer |
|
Document inner encode sub-batch size |
- |
|
integer |
|
Estimated token footprint allowed per encode bucket |
- |
|
integer |
|
Chars-per-token ratio used to plan encode buckets |
- |
|
integer |
|
Hard cap on sequence length advertised to the model |
- |
|
integer |
|
Character cap applied to each text before encoding |
- |
|
integer |
|
Reranker token bound |
- |
|
integer |
|
Candidate pairs per reranker forward pass |
- |
|
integer |
|
Vault chunk character budget |
- |
|
integer |
|
Chars-per-token ratio turning the model’s token window into a document chunk budget |
- |
|
integer |
|
Overlap carried across a document chunk boundary |
- |
IndexingLink to Core variables, Indexing
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
integer |
|
Code-chunk process-pool size |
- |
|
integer |
|
Auto-parallel chunking threshold in bytes |
- |
|
boolean |
|
Reuse sibling-namespace vectors across worktrees |
- |
|
integer |
|
CUDA allocator flush cadence on the codebase encode path, in slices |
- |
|
integer |
|
CUDA allocator flush cadence on the vault encode path, in slices |
- |
|
integer |
|
CUDA allocator flush cadence on the document encode path, in slices |
- |
|
string |
|
Dense encoder backend ( |
- |
|
string |
|
ONNX model file relative path |
- |
Index resource bounds and memory ceilingsLink to Core variables, Index resource bounds and memory ceilings
These bound the segment and queue geometry of one index run, its memory use, and its liveness. The defaults suit a managed multi-root service; lower them on a smaller host. Every memory figure here is in mebibytes (MiB).
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
integer |
|
Chunks per index upsert segment |
- |
|
integer |
|
Byte cap per index upsert segment |
- |
|
integer |
|
Chunks buffered in the producer-to-consumer index queue |
- |
|
integer |
|
Byte cap on the buffered index queue, applying backpressure |
- |
|
float |
|
Seconds without index progress before the run is failed |
- |
|
boolean |
|
Queue one failure-safe reindex when a search finds the served index shrunken below its published claim |
- |
|
float |
|
Resident-memory ceiling enforced at index checkpoints (MiB) |
- |
|
float |
|
CUDA-memory ceiling override in MiB; |
- |
|
float |
|
Memory reserved below the device total when the ceiling auto-derives (MiB) |
- |
|
float |
|
Fraction of CUDA memory the index allocator may reserve |
- |
|
integer |
|
Free device memory required before this process loads model stacks (MiB) |
- |
|
string |
|
Index resource profile advertised to the service; |
- |
How the CUDA ceiling and admission floor deriveLink to Index resource bounds and memory ceilings, How the CUDA ceiling and admission floor derive
The CUDA ceiling derives from the real device rather than shipping fixed. At 0 the ceiling is the device’s total memory minus VAULTSPEC_RAG_INDEX_CUDA_HEADROOM_MIB, so a larger card gets a larger budget without tuning. A positive value overrides that.
The ceilings bound the work an already-resident process does. VAULTSPEC_RAG_GPU_ADMISSION_FLOOR_MIB answers the question before it: whether this process may bring a model stack up at all. The process reads the floor once, before the first load. If the card has less free memory than the floor, the load is refused, and the message names both the reading and the floor.
The floor also derives by default. At 0 it comes from the CUDA demand the configured support profile declares, so it tracks the workload rather than one machine’s measurements. It does not read the device. Model weights occupy what they occupy on any card, so what a load needs is a property of the models, not the hardware. A figure calibrated to one card would refuse every load on a smaller one and under-protect a larger. A positive value overrides the derivation.
A floor has to cover the resident stack a load creates, plus the largest demand that stack then places on top of its own residency. Sizing it to the resident stack alone is not enough: on a card already holding one tenant, the leftover free memory still clears such a floor, so a second stack is admitted onto a device that cannot hold both. Setting it too high refuses loads the card could have served, and a floor above a small card’s total memory refuses every load.
Concurrency limitsLink to Core variables, Concurrency limits
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
integer |
|
Search worker limiter |
- |
|
integer |
|
Index job limiter |
- |
Search and model togglesLink to Core variables, Search and model toggles
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
boolean |
|
SPLADE sparse vectors on/off |
- |
|
string |
|
Default vault ranking intent when a search names none ( |
- |
|
boolean |
|
Intent-aware vault re-ranking on/off ( |
- |
|
integer |
|
Maximum results of one doc type on a vault page ( |
- |
|
boolean |
|
CrossEncoder rerank on/off |
- |
|
float |
|
Client connection and read budget for service-handled searches (seconds) |
|
|
float |
|
Maximum bounded wait accepted for search freshness (seconds) |
|
|
string |
|
Code domains hidden from results by default |
- |
|
string |
|
Code domains demoted (not hidden) by default |
- |
|
float |
|
Score subtracted from a demoted code result |
- |
|
boolean |
|
Collapse locale-variant code results by default |
|
|
float |
|
Vault graph cache lifetime backing link and grounding lookups (seconds) |
- |
Automatic updatesLink to Core variables, Automatic updates
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
boolean |
|
Filesystem auto-reindex on/off ( |
|
|
integer |
|
Compatibility input mapped to both adaptive coalescing bounds (ms) |
|
|
float |
|
Compatibility input mapped to the adaptive cooling maximum (s) |
|
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
float |
|
Minimum adaptive coalescing delay |
- |
|
float |
|
Maximum adaptive coalescing delay; cannot exceed maximum freshness |
- |
|
float |
|
Maximum post-success adaptive cooling delay |
- |
|
float |
|
Oldest ordinary-pressure event age before admission |
- |
|
float |
|
Maximum interval between service-measurement reevaluations |
- |
|
integer |
|
Pending path count that makes work ready; cannot exceed scope path limit |
- |
|
integer |
|
Maximum durable exact paths per controller |
- |
|
integer |
|
Maximum serialized durable exact-scope size per controller |
- |
A failed auto-reindex retries with exponential backoff and a circuit breaker that stops retrying a persistently failing source.
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
float |
|
Initial backoff before retrying a failed auto-reindex |
- |
|
float |
|
Maximum backoff between auto-reindex retries |
- |
|
float |
|
Random jitter fraction added to each retry backoff |
- |
|
integer |
|
Consecutive failures before the watch circuit opens |
- |
Storage maintenance (auto-prune)Link to Core variables, Storage maintenance (auto-prune)
These variables control the daemon’s scheduled storage-maintenance cycle. See the storage and maintenance guide for how a cycle runs.
Zero means opposite things on the two kinds of window here, so read the names carefully. The three GRACE_HOURS* windows are how long a namespace has to stay observably dead before it may be destroyed; they are rejected below 1 hour, because at zero the cycle that first sees a namespace would also be allowed to drop it. EPHEMERAL_IDLE_HOURS is a tier’s own on/off switch, and zero turns that tier off. So ..._EPHEMERAL_IDLE_HOURS=0 reclaims nothing, while a zero on ..._GRACE_HOURS_EPHEMERAL would have reclaimed everything on sight - which is why only the idle knob accepts it.
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
boolean |
|
Scheduled auto-prune on/off (server mode only) |
- |
|
float |
|
Minutes between maintenance cycles |
- |
|
float |
|
Continuous-orphan hours before an empty namespace is reclaimed (minimum |
- |
|
float |
|
Continuous-orphan hours before a point-bearing namespace is archived and reclaimed (minimum |
- |
|
float |
|
Continuous-orphan hours before a temp-rooted namespace is reclaimed, whatever it holds (minimum |
- |
|
float |
|
Days a snapshot archive is kept before the retention sweep deletes it |
- |
|
float |
|
Total-size cap on the archive directory (oldest evicted first) |
- |
|
integer |
|
Maximum namespaces reclaimed per cycle |
- |
|
float |
|
Idle hours before a live temp-rooted namespace is reclaimed ( |
- |
|
boolean |
|
Shrink pre-existing collections onto the bounded segment geometry |
- |
|
integer |
|
Maximum collections reconciled per cycle |
- |
|
float |
|
Per-collection wait for the merge to settle before reporting |
- |
PreprocessingLink to Core variables, Preprocessing
Variable |
Type |
Default |
Controls |
CLI flag |
|---|---|---|---|---|
|
integer |
|
Cap on text a preprocess hook may emit per file, in bytes |
- |
|
boolean |
|
Strip tags from |
- |
Config-only keysLink to Config-only keys
These keys exist in the configuration loader and read no environment variable of their own. Set them through a config source, not the environment.
Config key |
Type |
Default |
Controls |
|---|---|---|---|
|
string |
|
Two-state preprocessing mode; the environment reaches it through |
Hugging Face cacheLink to Hugging Face cache
vaultspec-rag downloads its dense, sparse, and reranker model files through the Hugging Face Hub. These are third-party variables (no VAULTSPEC_RAG_ prefix), so they sit outside the reference tables on this page. The Hub client honours most of them itself; the Controls column notes where vaultspec-rag reads or defaults one itself.
Variable |
Type |
Controls |
|---|---|---|
|
string |
Hugging Face access token; overrides a token saved by |
|
path |
Hub cache root. Read directly when reporting cache location; falls back to |
|
string |
Hub mirror base URL |
|
integer |
Per-file download timeout. The service defaults it to |
|
boolean |
Cache-only mode; no network access to the Hub |
|
boolean |
Cache-only model loading for Transformers |
|
boolean |
Skip on-the-fly safetensors conversion |
HF_HUB_OFFLINE is the authoritative offline switch; vaultspec-rag also honours TRANSFORMERS_OFFLINE, and when either is set to 1, true, yes, or on it loads every model cache-only. See the Hugging Face environment variable reference.
Searches additionally quiet the Hub and Transformers loggers by defaulting HF_HUB_DISABLE_PROGRESS_BARS, TRANSFORMERS_NO_ADVISORY_WARNINGS, and TRANSFORMERS_VERBOSITY when they are unset. Set them yourself to keep the library output.
Renamed and removed variablesLink to Renamed and removed variables
If a setting stopped taking effect after an upgrade, look for its old name here. A stale name sets nothing: the value falls back to the default rather than failing loudly, so nothing tells you at startup.
Three memory ceilings changed their unit suffix from MB to MIB. The old spellings are no longer read at all. Rename them wherever they are set, in an .env file, a supervisor unit, or a continuous integration job:
VAULTSPEC_RAG_INDEX_RSS_CEILING_MBis nowVAULTSPEC_RAG_INDEX_RSS_CEILING_MIBVAULTSPEC_RAG_INDEX_CUDA_CEILING_MBis nowVAULTSPEC_RAG_INDEX_CUDA_CEILING_MIBVAULTSPEC_RAG_INDEX_CUDA_HEADROOM_MBis nowVAULTSPEC_RAG_INDEX_CUDA_HEADROOM_MIB
The same rename applies to the JSON any script reads off the health, status, jobs, and diagnostics surfaces. Every _mb field is now _mib, including gpu_memory_used_mb, gpu_memory_total_mb, rss_ceiling_mb, and cuda_ceiling_mb. No value changed. These were always mebibytes, and only the spelling moved.
Tuning for memory and speedLink to Tuning for memory and speed
On a small GPU, the dense and sparse encoders halve their batch size and retry on a CUDA out-of-memory error, down to a batch of one. Most cards work without tuning. The knobs below reduce memory pressure before that automatic backoff has to engage, or raise throughput.
The two ceilings behave differently from that backoff, and it is worth knowing which is which. VAULTSPEC_RAG_INDEX_RSS_CEILING_MIB and VAULTSPEC_RAG_INDEX_CUDA_CEILING_MIB are not throttles: they are checked at index checkpoints, and a reading above one fails the run with rss_memory_ceiling or cuda_memory_ceiling. The first breach is latched, so the outcome does not change if a later sample recovers.
Their defaults are single-tenant. The resident-memory ceiling ships at 16384 MiB, which is the same 16 GiB the installation guide states as the minimum for the default profile, so on a machine sized to that floor one index run may claim all of it. On a host shared with anything else - another tenant, a build, a second project’s run - set both ceilings to what you can actually spare rather than leaving the defaults.
To fit a smaller GPU:
Lower the inner encode sub-batches:
VAULTSPEC_RAG_EMBEDDING_ENCODE_BATCH_SIZEandVAULTSPEC_RAG_EMBEDDING_CODE_ENCODE_BATCH_SIZE(32 each), andVAULTSPEC_RAG_EMBEDDING_DOCUMENT_ENCODE_BATCH_SIZE(12, smaller because document fragments fill the model’s whole window).Cap
VAULTSPEC_RAG_EMBEDDING_MAX_SEQ_LENGTH(default 2048) to shrink padded-attention memory.Raise
VAULTSPEC_RAG_INDEX_CUDA_HEADROOM_MIBto leave more of the device outside the indexing budget, or setVAULTSPEC_RAG_INDEX_CUDA_CEILING_MIBto pin an explicit ceiling.Set
VAULTSPEC_RAG_QDRANT_QUANTIZATIONtoscalarto compress the stored vectors.Turn off a model to free the most memory. Set
VAULTSPEC_RAG_SPARSE_ENABLED=0to drop the SPLADE encoder, orVAULTSPEC_RAG_RERANKER_ENABLED=0to drop the CrossEncoder.
To speed up indexing:
Raise
VAULTSPEC_RAG_INDEX_CHUNK_WORKERS(0 auto-sizes to the CPU count, 1 forces serial).Lower
VAULTSPEC_RAG_INDEX_PARALLEL_MIN_BYTESso the process pool engages on smaller trees.Raise
VAULTSPEC_RAG_INDEX_JOB_CONCURRENCY(default 4) if the host has spare cores.
Each variable’s default and meaning is listed in the preceding variable tables.
ExamplesLink to Examples
Point a single command at another project:
Command
vaultspec-rag --target /srv/projects/acme search "billing flow"
Bind the HTTP service to a non-default port:
Command
VAULTSPEC_RAG_PORT=9100 vaultspec-rag server start
Run the on-disk store instead of the supervised server:
Command
VAULTSPEC_RAG_LOCAL_ONLY=1 vaultspec-rag server start
Raise the log level to DEBUG for one command:
Command
vaultspec-rag --debug search "billing flow"
Where to go nextLink to Where to go next
See the Support section of the repo README.