context engineering
Context engineering is the practice of selecting and structuring the information a language model receives for each task, including instructions, data, tool results and history.
Context engineering is the work of deciding what goes into the context window, the input a large language model or AI agent receives at once, when it produces an answer. It covers not only instructions but also retrieved documents, database results, tool outputs, conversation history and long-term memory, including what to include, in what order and how much.
It is broader than prompt engineering, which focuses on the wording of a prompt, and aims to give the model only information that is accurate, current and authorized. It is considered especially important in agent systems that work through many steps.
This entry is based on AIPOST articles and widely known facts. If something is wrong, please send us a correction request.