RAG Retrieval & Tuning
When a command or chat uses a Space, Rephlo doesn't blindly stuff every document into the prompt. Instead it retrieves the passages most relevant to your request and injects only those — a technique called Retrieval-Augmented Generation (RAG). The RAG Retrieval settings let you tune how aggressive or generous that retrieval is.
You'll find this section near the bottom of Settings → General.

Why tune retrieval?
Retrieval is a balancing act:
- Too strict, and Rephlo may leave out useful context, giving thinner answers.
- Too lenient, and it pulls in marginally-related text, wasting tokens and sometimes adding noise.
The defaults work well for most people. Tuning helps when you have an unusual Space — very large, very technical, or full of near-duplicate content — and want to nudge the balance.
Basic vs. Advanced
There are two modes. Most users only need Basic.
Basic mode (default)
Pick a single strictness profile and Rephlo applies a sensible set of values for you:
| Profile | Behavior |
|---|---|
| Very Lenient | Retrieves broadly — favors including more context. |
| Lenient | Slightly relaxed retrieval. |
| Balanced | The default — a good middle ground for most Spaces. |
| Strict | Tighter — only clearly relevant passages. |
| Strictest | Most selective — only the highest-confidence matches. |
Just click a profile; the change saves automatically.
Advanced mode
Toggle Advanced to edit the underlying knobs directly. When you switch in, the fields are pre-filled from your current profile so you have a sensible starting point. Available controls:
- Similarity floor — the minimum relevance score a passage must clear to be considered.
- Selected-ratio cutoff — how much of the candidate pool to keep.
- High-confidence threshold — the bar for treating a match as clearly relevant.
- Minimum chunks and minimum RAG corpus — floors that keep retrieval from returning too little.
- Command token budget and chat token budget — how many tokens retrieved context may occupy for commands vs. chats.
Token budgets are automatically clamped to safe limits and to what your provider can actually handle, so you can't set a value that would break a request.
Saving and resetting
- Auto-save — every change you make is saved immediately, just like the rest of Settings. There's no separate Save button.
- Reset to Defaults — restores the factory defaults: Basic mode with the Balanced profile.
If retrieval tuning ever isn't available on your machine, Rephlo quietly falls back to its built-in defaults — your Spaces still work.
How this fits with data modes
RAG retrieval works hand-in-hand with how a Space stores its content. Retrieval runs over your documents in either data mode; Raw keeps the full text ready out of the box, while Compact stores AI summaries to save tokens. For the full picture, see Smart Compaction & Data Modes.