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.

Level: intermediateTopic: Prompt context engineering

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.