AI engineering glossary · Prompt context engineering

What is context budget?

Context budget: The share of a model's available input space you allow each kind of content, such as instructions, documents, memory and tool output. Because space and cost are limited, deciding what deserves room is a core design choice.

Level: intermediateTopic: Prompt context engineering

Context budget: an example

Cap retrieved documents at 6,000 tokens so that history and instructions never get squeezed out.

Related terms

More Prompt context engineering terms

Where you learn it

Context 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.