AI engineering glossary · Prompt context engineering
What is token budget?
Token budget: The plan for how many tokens each part of a request may use, covering instructions, history, retrieved documents and the reply, within the model's limit and your cost target. Budgeting stops overflow errors and surprise bills.
Token budget: an example
With a 16,000-token limit you allot 1,000 to the system prompt, 9,000 to documents, 4,000 to history and 2,000 to the answer.
Related terms
More Prompt context engineering terms
- Token counting
- Token pricing
- Tool choice
- Tool description
- Tool result message
- Tool schema
- Tree of Thoughts
- User prompt
Where you learn it
Token budget is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.