# Token Efficiency & Context Budgeting Strategies

Category: Context & Config
Stack: CAVEMAN Compression, Prompt Caching, Token Budgeting

## Overview
Cutting production token usage by 70% using prompt caching, stripped conversational padding, and aggressive system prompt compression.

## The Problem
Unmanaged system prompts and conversational filler blow up LLM token budgets and drive up operational inference costs.

## Production Rule
Structure static instructions at the beginning of the prompt to maximize cache hit rates (90% discount). Strip boilerplate greetings and conversational padding.

## Code / Specification
File: `caching_ordering_rule.md`

```token economics
Prompt Assembly Sequence for Optimal Cache Hit:
1. Static System Rules (Cached - 90% cost savings)
2. Project Conventions & Schemas (Cached)
3. Retrieved Context Documents (Cached across multi-turn queries)
4. Dynamic User Request & Turn History (Uncached)
```
