chapter one

1 Introduction to context engineering

 

This chapter covers

  • What context engineering is and how it is explained through this book
  • The evolution from large language models (LLMs) to workflows, agents, and agentic systems
  • The limitations and technical barriers of LLMs that make context engineering necessary
  • The different sources that shape context in LLM-based systems

Artificial intelligence (AI) is driving one of the fastest technology adoption cycles in recent history. The most visible part of this wave is generative AI (GenAI), a class of AI systems designed to produce novel content from natural-language input, including text, code, images, music, and video. At the core of text-based GenAI are large language models (LLMs), deep learning models capable of interpreting and generating human-like language. In practice, the effectiveness of an LLM-based system depends on its context, meaning the information available to the model at inference time. Context engineering is the discipline of selecting, organizing, and updating that information so the model receives the right inputs in the right form, at the right time, and within the limits of its context window.

1.1 Defining context engineering

1.1.1 The rise of context engineering

1.1.2 The context engineering stack

1.1.3 Context engineering as an optimization problem

1.2 Evolution of LLM-based systems

1.2.1 LLMs, the foundational models

1.2.2 AI workflows

1.2.3 AI agents

1.2.4 Agentic systems

1.3 Limitations of LLMs

1.3.1 Information integrity

1.3.2 Technical and architectural constraints

1.3.3 Bias, safety, and privacy

1.4 Benefits of context engineering

1.4.1 Reliability and grounded reasoning

1.4.2 Consistency across steps and interactions

1.4.3 Conversation management and personalization

1.4.4 Explainability and auditability

1.4.5 Efficiency

1.4.6 Scalability and iteration

1.5 Taxonomy for context sources

1.5.1 Instructions

1.5.2 External knowledge

1.5.3 Tools