Smart Compaction & Data Modes
When you attach a Space (your knowledge base of documents) to a command or chat, all that text counts toward a token budget. Two features help you stay within budget without losing the context you care about: data modes (raw vs. compact) and Smart Compaction (automatic AI summarizing).
This page explains both, and when to use each.
Token budget per Space
Every Space has a token budget — the maximum combined size of all the documents in it. The default is 100,000 tokens (adjustable). Rephlo tracks two running totals for each Space:
- Raw (normal) token count — the total if every document is used in full.
- Compact token count — the total if compacted (summarized) versions are used instead.
This lets you see, at a glance, how much room you'd save by switching to compact data.
Data modes: Raw vs. Compact
Each Space has a data mode that decides which version of its documents gets sent to the AI:
| Data mode | What it sends | Tokens | Fidelity |
|---|---|---|---|
| Use Raw (default) | The full, original text | Higher | Highest — nothing is lost |
| Use Compact | An AI-summarized version of each file (where it's been compacted) | Lower | Reduced — some detail is condensed |
Why Raw is the default
Raw is the default because it keeps the full text of every document ready for retrieval out of the box — Rephlo can pull the most relevant passages for a query (Retrieval-Augmented Generation, or RAG — see RAG & Retrieval) with no extra setup.
If you'd rather save tokens, switch the Space to Use Compact. Compact mode summarizes each file individually and sends those compacted versions instead of the full text, so each request carries fewer tokens.
Overriding the mode per command
You usually set the data mode once on the Space, but a single command can override it. A command can force Raw (for maximum accuracy) or Compact (to save tokens) regardless of the Space's default. When a command doesn't specify anything, it simply follows the Space's setting.
Smart Compaction
Smart Compaction automatically creates AI-summarized versions of documents so a Space fits comfortably inside its token budget. It is opt-in: it's off by default, both globally and per Space, so nothing is summarized unless you choose it.
You enable it in two places:
- Globally — a master on/off switch in Advanced Configuration (off by default).
- Per Space — turn it on for the specific Spaces where you want it.
Once enabled, Rephlo summarizes documents in that Space and stores both versions: the compact summary and the original, so you never lose the source.
Compaction strategies
You choose how aggressively to summarize. Each strategy is a different balance between token savings and detail:
| Strategy | Token reduction | Keeps |
|---|---|---|
| Conservative | Smallest — minimal trimming | Most details |
| Balanced (default) | Moderate | A good middle ground of detail and savings |
| Aggressive | Largest — maximum savings | The essentials — some nuance lost |
Very small documents are left alone — Rephlo only compacts documents above a minimum size threshold, since summarizing a tiny file isn't worth the detail loss. These thresholds, the default strategy, and the global toggle all live in Advanced Configuration.
How a document gets compacted
When to use what
- Writing and research projects — Use Raw so the local search index can pull exact passages.
- Large code repositories or long reference docs — Enable Smart Compaction with the Balanced strategy to fit more context while keeping speed reasonable.
- Very large archives you need to squeeze into a context window — Use Aggressive compaction for maximum savings, accepting some loss of nuance.
- Anything where every detail matters — Stay on Raw with compaction off, or use Conservative if you must trim.
The Space settings screen showing the Raw/Compact toggle, the Smart Compaction switch, and the strategy selector.