Part 3 — Context Engineering: The Discipline Around Memory

This section covers context engineering as the discipline of deciding what enters the model's window — how memory, tools, prompts, and retrieval compete for scarce tokens.

What you will learn

  • What context engineering is and how it differs from prompt and memory engineering
  • How to budget tokens and assemble context without polluting the window
  • The role of retrieval, system prompts, and tool definitions as context
  • Failure modes like context rot, and how to measure context quality

Chapters in this section

There are 18 chapters in this part. Open any chapter to read it on its own, or work through them in order.

  1. 1 What Is Context Engineering?
  2. 2 The Six Pillars of Context Engineering
  3. 3 Context Engineering vs Prompt Engineering
  4. 4 Context Engineering vs Memory Engineering
  5. 5 Deciding What Deserves a Spot in the Context Window
  6. 6 The Context Budget: Treating Tokens as a Scarce Resource
  7. 7 Context Assembly Pipelines
  8. 8 Retrieval as the Bridge Between Memory and Context
  9. 9 Tool Definitions as Context
  10. 10 System Prompts as a Form of Long-Lived Memory
  11. 11 Context Window Pollution and Its Causes
  12. 12 Context Rot: Why More Isn’t Better
  13. 13 Grounding: Reducing Hallucination Through Retrieved Context
  14. 14 Context Engineering for Multi-Agent Systems
  15. 15 The Relationship Between RAG and Context Engineering
  16. 16 Static Context vs Dynamic Context
  17. 17 Context Engineering Failure Modes
  18. 18 Measuring Context Quality, Not Just Context Quantity