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.
Directly dictates the memory footprint and operational throughput of long context chat agents, cost optimization, and inference acceleration; configuring Prompt Compression allows engineering teams to run high-capacity models cost-effectively on edge devices.
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.
They use small language models to calculate the information entropy (mutual information) of tokens and discard those that add little value.
Proper compression algorithms can reduce prompt length by 20% to 50% without affecting the accuracy of the model's final response.
Reference this definition in your articles, research, or documentation to credit this source:
Long-prompt inference remains expensive because prefill attention scales quadratically with sequence length. We propose Spectral-LSH, a training-free prompt...