Prompt LibraryAgents

LLM Context Window Budget Planning Prompt

Allocate a fixed token budget across a system prompt's components.

The prompt

Total context budget: {{total_tokens}} tokens.
Components competing for space: {{components}}

Assign each component a token allocation and a priority tier (must-have, should-have, nice-to-have).
State what gets cut first when a single request exceeds budget, in order.
State the rule for truncating retrieved evidence vs truncating conversation history — which goes first and why.
Return the plan as a table: component, tokens, tier, truncation rule.

Replace the {{fields}} with your own context and tighten the rules to match your domain.

Share this prompt