How is context engineering different from prompt engineering?#
Prompt engineering is about how you write instructions for a model. Context engineering is about everything else the model has access to, from retrieved documents and project conventions to previous decisions, available tools and summarised conversations. It also involves deciding what information to leave out. The goal is to fill the context window with information that actually helps the model do its job, rather than simply providing as much information as possible. Research on context rot has shown that models become increasingly unreliable as the amount of input grows, making the quality and relevance of the information just as important as the instructions themselves.
What is the most valuable context for context engineering to capture?#
Some of the most valuable context is knowledge that exists only in people's heads. AI models already have access to a great deal of public knowledge, but they don't know why your organisation built a particular service the way it did, which constraints actually matter or which decisions made years ago still need to be respected. Capturing that knowledge helps agents produce results that make sense within your organisation. There are different ways to provide this context, including RAG for retrieving documents, AGENTS.md for defining project conventions and grounding for connecting answers to verifiable information. Getting this right also means being careful about how context is compressed over time, as the autocompact cliff illustrates what can happen when important information gets lost in the process.
