Repository navigation
Configuration
Ragmir reads .ragmir/config.json from the current directory or an ancestor. Start with rgr setup and edit JSON only for a concrete need.
{
"sources": ["docs/**/*.md", "src", "!docs/archive/**"],
"privacyProfile": "private",
"retrievalProfile": "balanced",
"embeddingProvider": "local-hash"
}| Field | Default | Why change it |
|---|---|---|
sources |
[] |
Add paths, globs, and ! exclusions |
privacyProfile |
private |
Use strict for the strongest local floor |
retrievalProfile |
balanced |
Choose fast, quality, or an explicit custom budget |
embeddingProvider |
local-hash |
Select transformers only after an explicit preload |
topK |
8 |
Change the default passage count |
mcpMaxOutputBytes |
32768 |
Bound variable-size MCP tool and resource JSON; the server also enforces an absolute 1 MiB ceiling |
chunkSize / chunkOverlap
|
1200 / 200
|
Tune chunking, then rebuild |
maxFileBytes |
50000000 |
Raise only when the corpus justifies it |
includeExtensions |
[] |
Add safe custom text extensions |
Changing an embedding provider, model, or chunking field requires rgr ingest --rebuild.
rgr setup --semantic
rgr ingest --rebuildThis preloads the configured Transformers model once and leaves remote model loading disabled for
normal retrieval. rgr models pull --enable enables the same provider after initial setup.
-
privatedefaults remote model loading to disabled and keeps redaction enabled; remote Transformers loading still requires an explicit opt-in. -
strictalso bounds MCP output and disables every external extractor. -
trustedandcustomare explicit operator choices for different controls.
The privacy profile is a safety floor, separate from retrieval quality.
rgr ocr doctor
rgr ocr setup --language eng+fraOCR is optional and page-aware. Custom extractor commands must be JSON argument arrays. They execute without a shell and must print text to stdout.
Use RAGMIR_* environment variables for local experiments, then run rgr status --json to inspect the effective configuration.
For a long-running process with multiple isolated project workflows, create one client per project
root with createRagmirClient({ cwd }), keep process-wide environment overrides stable after
startup, and close every client during shutdown. If several OS processes can ingest the same
storage directory, the host must coordinate a single writer.
Run rgr limits to inspect fixed parser ceilings. Office archives allow at most 512 text entries,
25 MB per entry, and 50 MB of expanded text in total. PDF extraction is capped at 1,000 pages and
25 million text characters. Combined stdout and stderr from a local external extractor are capped
at 25 MB; files above maxFileBytes are skipped and reported.
Canonical source: docs/configuration.md.