Skip to main content

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 modeWhat it sendsTokensFidelity
Use Raw (default)The full, original textHigherHighest — nothing is lost
Use CompactAn AI-summarized version of each file (where it's been compacted)LowerReduced — 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:

  1. Globally — a master on/off switch in Advanced Configuration (off by default).
  2. 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:

StrategyToken reductionKeeps
ConservativeSmallest — minimal trimmingMost details
Balanced (default)ModerateA good middle ground of detail and savings
AggressiveLargest — maximum savingsThe 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.

Space Data Management — Token Usage for Normal vs Compact, the AI-data / Smart Use toggles, and the per-file data list The Space settings screen showing the Raw/Compact toggle, the Smart Compaction switch, and the strategy selector.