Learning a Single Token to Replace Long System Prompts in LLMs
cs.CL
Submitted: 2025-11-28
Updated: 2026-08-28
Comments: 12 pages, 4 figures
Code: https://github.com/meta-llama/llama-models
License: http://creativecommons.org/licenses/by/4.0/
The gist: Long system prompts are widely used to steer Large Language Models (LLMs), but repeatedly processing them at inference time is inefficient and consumes valuable context budget.
Terminology
Abstract
Long system prompts are widely used to steer Large Language Models (LLMs), but repeatedly processing them at inference time is inefficient and consumes valuable context budget. This motivates a central question: can the behavioral effect of a long system prompt be retained using only a minimal learned representation? To enable this, we propose a lightweight training framework that learns a single Behavior-Equivalent Token ([BE]). The framework first trains [BE] to encode the semantic content of the original system prompt via reconstruction, and then distills the prompt's downstream behavior into this single token. Importantly, our method requires no update to the pretrained LLM weights, no auxiliary compression models, and no labeled responses. Empirical evaluations on three datasets show that replacing long prompts with a single [BE] token yields up to a 3000 times prompt compression ratio, while retaining about 98% of the downstream performance of the original system prompts. This substantially reduces inference cost and frees nearly the entire context window for user inputs and model outputs.
Sources
- The Llama 3 Herd of Models
- LazyLLM: Dynamic Token Pruning for Efficient Long Context LLM Inference
- You Can't Steal Nothing: Mitigating Prompt Leakages in LLMs via System Vectors
- Large Language Models Meet Harry Potter: A Bilingual Dataset for Aligning Dialogue Agents with Characters
- Exploring the Hidden Capacity of LLMs for One-Step Text Generation
- Saliency-driven Dynamic Token Pruning for Large Language Models
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering