# What is Prompt Compression? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Prompt Engineering  
> **Canonical Citation:** [https://spidits.com/ai-glossary/prompt-compression](https://spidits.com/ai-glossary/prompt-compression)

## Definition
Prompt Compression is a optimization technique that filters out redundant tokens or words from a prompt while preserving its core semantic meaning. This saves context window space and lowers API costs.

## Architectural Mechanics & Deep Dive
Prompt Compression is an optimization technique that removes redundant, low-entropy tokens from system instructions or context prompts before passing them to the model. By calculating token information density and removing words that do not alter the semantic meaning, prompt compression reduces inference latency, token usage, and API costs.

## Industry Applications & Real-World Use Cases
Long context chat agents, cost optimization, and inference acceleration

## Frequently Asked Questions

### How do prompt compressors work?
They use small language models to calculate the information entropy (mutual information) of tokens and discard those that add little value.

### Does this break model performance?
Proper compression algorithms can reduce prompt length by 20% to 50% without affecting the accuracy of the model's final response.

## Related Terminology
- [prompt-engineering](https://spidits.com/ai-glossary/prompt-engineering)
- [context-window](https://spidits.com/ai-glossary/context-window)
- [token](https://spidits.com/ai-glossary/token)

---
*From the SPIDITS AI Knowledge Base (300+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
