Context Engineering
Context engineering is the discipline of deliberately designing what information goes into an LLM's context window - and what stays out. In 2025โ2026, it has become at least as important as prompt wording: the right context beats the perfect prompt every time. This section covers the principles, the limits, and the compression strategies that make context-managed systems reliable.
In This Section
Context Engineering Overview
What context engineering is, the context stack (system prompt โ examples โ retrieved docs โ history), and why it matters more than prompt wording.
Long Context Limitations in Practice
Needle-in-haystack failures, lost-in-middle degradation, and why a 1M-token window does not mean 1M tokens of reliable recall.
Context Compression & Summarisation
Sliding window memory, hierarchical summarisation, selective retention, and KV cache strategies for long-running agents.