Context engineering
Context engineering is the practice of designing and curating the full context window provided to a large language model — including system prompts, retrieved documents, conversation history, tool outputs, structured data, and other information. The objective is to improve the quality, relevance, and accuracy of model outputs.
As models are increasingly deployed in agentic and multi-step workflows, context engineering becomes more important than prompt engineering alone.
Context engineering is a superset of prompt engineering. Prompt engineering is the practice of designing and refining the instructions given to a model — primarily the system prompt, the behind-the-scenes instructions that developers bake into a product to shape a model’s behavior — to elicit better, more accurate, or more useful outputs. Context engineering is broader in scope. Rather than focusing on the initial input alone, context engineering is about managing the size and focus of the context throughout a model’s session.
Because LLMs are sensitive to how questions and instructions are phrased, the structure and content of the context can significantly affect the quality of the response.
See also agent skills, which support context engineering.