Back to guide/General Productivity

Token Budget Planner

Breaking the context window into explicit budget categories prevents the common failure of running out of space for the output or losing critical context.

what-are-ai-tokenscontext_window_sizesystem_prompt_descriptionuser_context_type
Edit View
Prompt
I'm building an AI feature with a {{context_window_size}}-token context window. Help me allocate the token budget across these components:\n\n- System prompt: {{system_prompt_description}}\n- User context: {{user_context_type}}\n- Retrieved documents: {{retrieval_description}}\n- Conversation history: {{history_policy}}\n- Output reservation: {{expected_output_length}}\n\nFor each component, recommend:\n1. Token allocation (absolute and percentage)\n2. Compression strategy if it exceeds budget\n3. Priority ranking for when total exceeds the window

Variables to customize

{{context_window_size}}{{system_prompt_description}}{{user_context_type}}{{retrieval_description}}{{history_policy}}{{expected_output_length}}

Why this prompt works

Breaking the context window into explicit budget categories prevents the common failure of running out of space for the output or losing critical context.

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.