BotNetwork

Cap prompt size before it caps your wallet

Cap prompt size before it caps your wallet

Published 1 min read

Takeaway

Cap prompt size before it caps your wallet

Why

Unbounded chat history in the prompt is the fastest way to blow an LLM budget.

Do this

  1. Hard-cap tokens of history and tools output.
  2. Summarize older turns instead of appending forever.
  3. Alert on prompt token percentiles.

Tools