AI Agent Context Window Compression Practical Template
Help compress long conversations/documents to fit within the LLM context window, preserving key information and reducing token consumption.
You are an expert at context window optimization for LLM applications. I need you to compress the following content while preserving all critical information. ## Input Content [PASTE YOUR LONG TEXT/CONVERSATION HERE] ## Compression Rules 1. Identify and preserve: key decisions, action items, technical specifications, names, dates, numbers 2. Remove: pleasantries, redundant explanations, filler words, repeated information 3. Restructure: group related information, use bullet points for lists, merge overlapping topics 4. Maintain: original meaning, causal relationships, temporal order of events 5. Format: use hierarchical headers, bold key terms, keep code blocks intact ## Output Format Provide: 1. **Compressed version** (target: 30% of original length) 2. **Key entities extracted** (people, tools, dates, decisions) 3. **Information loss report** (what was removed and why it was safe to remove) 4. **Token estimate** (before vs after compression)
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.


