Tools
Token usage optimizer
Compare prompt stuffing (docs + rules + examples every turn) against full documents, RAG chunks, and relevant facts from UniFact. Adjust inputs for your workload — illustrative estimates for sales and planning.
Privacy and event SOP questions; small corpus, high trust bar.
$97.14
Monthly savings (facts vs prompt stuffing)
80%
Context reduction per turn
$1166
Annual savings (same assumptions)
Workload inputs
Pricing & behavior
Context per agent turn
Estimated monthly cost by strategy (USD)
Prompt stuffing = all documents plus rules, few-shot examples, and tool definitions re-sent each turn. Facts assume stable published context with higher cache hit rate.
Strategy comparison
| Strategy | Context / turn | Effective turns | Input tokens / mo | Total cost / mo |
|---|---|---|---|---|
| Prompt stuffing | 6.7k | 6.9 | 43.48M | $118 |
| Full documents | 3.2k | 6.4 | 22.53M | $60.05 |
| RAG chunks | 2.6k | 5.7 | 17.18M | $43.97 |
| Relevant facts | 1.3k | 4.4 | 8.91M | $20.56 |
Optimization levers (ranked)
| Priority | Lever | Estimated impact |
|---|---|---|
| High | Replace prompt stuffing with retrieved facts | ~5.4k fewer input tokens per turn (80% on context vs stuffing baseline) |
| High | Reduce repair turns (governed facts vs invented policy) | ~200% fewer effective turns vs doc approaches |
| Medium | Trim stuffing overhead (rules, few-shot, tool defs) | Prompt stuffing includes ~3.5k tokens of rules/examples beyond documents — audit system prompts |
| Medium | Prompt caching on stable fact prefix | Up to 90% off cached input — facts cache better than rotating doc dumps |
| Low | Scope facts per intent (not whole registry) | Fact bundle size is reasonable for single-turn injection |
Methodology & limits
Prompt stuffing is the anti-pattern baseline: every document plus bloated system prompts, examples, and schemas on every turn. Full documents omits that extra overhead but is still naive. RAG and facts reduce context; facts also cut repair turns when agents stop inventing policy.
Illustrative model only — validate against your provider billing. Documents remain the legal source of record; facts govern what agents may assert in operations.