|
Download INSERTION.md from aialchemist-dev/compressor-reflex: direct link, hf CLI and curl.
- Browser
- Download file 2.28 kB
-
https://huggingface.co/aialchemist-dev/compressor-reflex/resolve/main/INSERTION.md
- Command line
-
hf download hf://aialchemist-dev/compressor-reflex/INSERTION.md
-
curl -L -o INSERTION.md https://huggingface.co/aialchemist-dev/compressor-reflex/resolve/main/INSERTION.md
2.28 kB
Compressor Reflex (v1): Insertion Point Specification
1. Architectural Placement
The Compressor Reflex sits inline between tool execution and conversational context append.
[Agent Core / LLM]
│
│ 1. Emits Tool Call (e.g. view_file, grep_search, run_command)
▼
[Tool Execution Engine]
│
│ 2. Returns Raw Output (stdout/stderr, file lines, search hits)
▼
┌────────────────────────────────────────────────────────┐
│ COMPRESSOR REFLEX INTERCEPTION │
│ │
│ Input: Step Intent (<= 128 tok) + Raw Output Chunk │
│ Logic: Line-level keep/drop classification │
│ Policy: Fails-Open (keep on uncertainty / <= 5 lines) │
└────────────────────────────────────────────────────────┘
│
│ 3. Returns Compressed Output (Decision-relevant lines only)
▼
[Context Accumulator / Trajectory Store]
│
│ 4. Compressed context sent to LLM on subsequent step
▼
[Next Agent Step]
2. Interception Contract
- Timing: Immediately after the tool process finishes execution and captures stdout/stderr/return payload, but strictly before that text is appended to the message history or prompt buffer.
- Inputs:
intent: The current user prompt, active goal, or reasoning step that prompted the tool call ($\le 128$ tokens).raw_output: The verbatim text output from the tool execution.
- Fail-Open Policy:
- If output length $\le 5$ lines or $\le 64$ tokens $\rightarrow$ bypass compressor, pass through verbatim.
- If any runtime, tokenizer, or inference error occurs $\rightarrow$ pass through verbatim with warning log.
- Line scoring: Keep any line where $p(\text{keep}) \ge \tau$ (where $\tau$ is calibrated on the must-keep anchor set).
- Output: A reconstructed string containing only the kept lines in their exact original relative order, preserving line numbers and error context.