ARMARA Course 02

Course 02 / Module 09

Pay fewer tokens for the same answer

Compress one disposable sample, measure its token reduction, and judge the fidelity trade-off with both a score and your own reading.

Level
Beginner
Time
12 minutes
Commands
4
Finish
A measured compression choice

Video / coming soon

The written lesson is complete now.

Use disposable text

Start with the supplied morning-note sample. Do not practice on a contract, medical note, source file, or private prompt.

Use Windows paths and PowerShell. The ArmaraOS compression flags are the same on both platforms.
01

Know the three modes

ModeIntent
offKeep the input unchanged.
balancedDefault compromise between size and fidelity.
aggressiveFavor a larger reduction and inspect the loss carefully.
02

Measure aggressive compression

Run in your terminal
armaraos compression test --file <BEFORE_FILE> --mode aggressive --stats
Real aggressive compression output with token savings and semantic score
Fresh live output / supplied course sample / 24 August 2026

This run saved 192 of 315 estimated tokens, or 61.0 percent. The low semantic result and awkward doubled period show why smaller is not automatically better.

03

Inspect balanced JSON

Run in your terminal
armaraos compression test --file <BEFORE_FILE> --mode balanced --json
Selected real balanced compression JSON metrics
Selected metrics / compressed text omitted and labeled

JSON prints the compressed text and metrics. --stats is ignored when JSON is selected, so choose one reporting form.

04

Score the actual saved pair

Run in your terminal
armaraos compression score --before <BEFORE_FILE> --after <AFTER_FILE>
Real compression score 0.4646 and aggressive mode detection
Fresh live output / actual before-and-after files

Both file arguments are required. A score of 0.4646 makes the aggressive trade-off visible, but you still need to read the compressed text.

05

Resolve a plain-language mode hint

Run in your terminal
armaraos compression detect "use aggressive eco mode"

Detect returns aggressive. It resolves intent; it does not compress the file by itself.

06

Leave instrumentation in the annex

Profiles, adaptive behavior, cache helpers, and project profiles are engine instrumentation. They are reference material rather than required daily work.

Check it / measure your own sample

Decide whether the saved tokens are worth the loss.

Run aggressive compression with stats on a long disposable file. Save its actual output, score the pair, and read both texts before deciding.

Safety note

Aggressive compression trades fidelity for cost. Score and read the result before using it for code, contracts, medical information, legal text, or any task where wording matters.

Troubleshooting for this sitting
What you seeLikely causeWhat to do
No input is readNo text, file, or stdin was supplied.Add one input source.
Stats is absentJSON was also selected.Use stats or JSON, not both.
Score errorsA required file is missing.Supply both before and after paths.
Output is shorter but worseUseful meaning was removed.Choose balanced or leave compression off.

Back to Module 2.8

Next / Module 2.10

Change config without wrecking it, and meet the destructive inventory

Lesson ready