Skip to content
LLM Engineering

Context engineering

Manage what goes into the context window for quality, cost and security.

Context engineering is the discipline of managing what goes into an LLM's context window. This hub covers context budgets, summarisation, ordering, lost-in-the-middle, PII redaction and injection defence.

How context is assembled before every model call

Step 1 of 5

Gather

Collect the instructions, the conversation so far, retrieved documents and tool results that might matter for this request.

The context window is a budget: everything you add competes for attention and costs tokens.

Start here

Begin with the fundamentals

The recommended first lesson for this topic.

Start
Architecture patterns
Technologies

Related topics