SECAI Core · phase 5 of 15

Prompt compression

The reduction of the complexity of a prompt while preserving its meaning and required information in order to reduce cost in a token-limited environment

The Explain card

Plain English
Prompt compression reduces the size and complexity of a prompt while keeping its meaning and required information, so it costs fewer tokens and fits within context limits.
Example
A retrieval pipeline trims retrieved documents to the most relevant sentences and shortens a long system prompt before sending everything to the model. The request drops from thousands of tokens to a few hundred with the same answer quality.
Why it matters
Compression changes what the model sees. If a safety instruction or a "do not reveal" clause is trimmed as redundant, the guardrail disappears. Defenders test compressed prompts as carefully as the originals.
Hook
Compression squeezes the prompt; make sure the rules are not what gets squeezed out.

Where it sits in the deck

Phase 5: Interacting with Models: Prompting, APIs, and Retrieval

With a working model and clean data, learn the interaction layer — how users and systems communicate instructions and retrieve grounded answers.