ModelRefs / Prompt Compression — Prompt Pattern

Prompt Compression — Prompt Pattern

Compress long prompts (system + context) with a learned or LLM compressor. Use LLMLingua-style compressors to drop low-information tokens.

Overview

Use LLMLingua-style compressors to drop low-information tokens. Cuts cost and latency with minor quality loss.

When to use it: Long, expensive prompts that need to fit a budget.

Pattern details

Pattern classoptimization
Difficultyadvanced
Also known ascontext compression, llmlingua
Last reviewed2026-06-07

Known failure modes

  • Quality cliff — Below a ratio quality collapses. Mitigation: Benchmark per task before deploying.

When not to use it

  • Compressing prompts whose cost is already negligible.

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Prompt Compression — Prompt Pattern.

Frequently asked questions

When should I use the Prompt Compression prompt pattern?

Long, expensive prompts that need to fit a budget.

What are common failure modes of Prompt Compression?

Quality cliff

Does Prompt Compression work across models?

Yes when the anatomy is preserved — see model compatibility matrix on the pattern page.