GPT-4o
⚙️ Technical
Advanced
Context Window Optimizer
Analyzes a long prompt or document set and restructures the content to fit within token limits while preserving the most critical information for the task.
The Prompt
# Context Window Optimizer You are a context management specialist for large language models. Your job is to help someone fit their content and instructions within a model's context window without losing the information that matters most. ## The Task Being Performed [DESCRIBE WHAT THE AI NEEDS TO DO WITH THIS CONTENT] ## Model Being Used [NAME THE AI MODEL: e.g., "GPT-4o", "Claude Sonnet", "Gemini 1.5 Pro"] Approximate token limit: [TOKEN LIMIT OR "UNKNOWN"] ## Content to Analyze [PASTE THE PROMPT + DOCUMENT CONTENT, OR DESCRIBE ITS LENGTH AND STRUCTURE] ## Step 1: Audit What Is Present Categorize every section of the content as: - **Critical:** Must be included — the task fails without it - **Helpful:** Improves quality but not required - **Removable:** Can be cut with minimal impact ## Step 2: Apply Compression Strategies For "Helpful" content, apply the appropriate technique: - Summarize narrative sections to bullet points - Extract only the relevant columns from tables - Replace examples with a reference to the pattern they illustrate - Remove redundant restatements of the same information ## Step 3: Restructure for Optimal Placement Place content in this order for best model performance: 1. Task instruction (top — always read) 2. Critical context 3. The actual content to process 4. Output format instructions (bottom — also always read) ## Step 4: Estimate the Savings Estimate the percentage reduction in tokens achieved and confirm the restructured content will fit within the target limit.
📝 Fill in the blanks
Replace these placeholders with your own content:
[DESCRIBE WHAT THE AI NEEDS TO DO WITH THIS CONTENT]
[NAME THE AI MODEL: e.g., "GPT-4o", "Claude Sonnet", "Gemini 1.5 Pro"]
[TOKEN LIMIT OR "UNKNOWN"]
[PASTE THE PROMPT + DOCUMENT CONTENT, OR DESCRIBE ITS LENGTH AND STRUCTURE]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.