When using AI, what's needed is 'context engineering' rather than prompt engineering

Philip Schmidt, former technical lead at Hugging Face and senior AI relations engineer at Google DeepMind, argues in his blog that 'context engineering' is essential when using AI.
The New Skill in AI is Not Prompting, It's Context Engineering
In general, it is said that ' prompt engineering ,' which makes instructions to AI specific and detailed, is effective in optimizing AI responses. However, Schmidt argues that the focus is shifting from 'prompt engineering,' which has been important in the AI world until now, to 'context engineering,' a broader and more powerful concept.
Context engineering is the technique of providing an AI with all the necessary context to realistically solve a task. Context doesn't just refer to the instructions (prompts) you send to the AI, it includes any information the AI refers to before generating a response.
The elements that make up the context are as follows:
Instructions/System Prompts: Initial settings and rules that define basic AI behavior
User prompts: specific questions or tasks that users provide
State/History (short-term memory): The flow of the conversation up to that point
Long-term memory: User preferences and knowledge learned from previous interactions
Retrieved information (RAG): External up-to-date information obtained from documents, databases, APIs, etc.
Available tools: Define functions that AI can execute, such as checking inventory or sending emails
Structured output: Specifying the format of the AI's answers

The secret to building a good AI agent isn't writing complex code, but providing high-quality context, Schmidt said.
For example, suppose you ask an AI assistant to arrange an appointment by email, saying, 'Do you have time for a quick meeting tomorrow?' If the quality of the context the AI agent receives is low, it will only see the text of the email it received, and will only be able to respond mechanically and unhelpfully with a response like, 'Thank you. Tomorrow is free. What time would you like to meet?'
However, if you provide context such as calendar information, past emails with the other person, a contact list, and an email tool, the AI agent can respond with an email saying, 'Hello! Sorry, I'm booked all day tomorrow. I'm free on Thursday morning. I've sent you an invite, so please let me know when that works for you.'
Schmidt argues that the magical responses of AI come not from the intelligence of the AI model or the ingenuity of the algorithm, but from providing the right context for the right task, and that many of the failures of AI agents are due to failures of context.

While prompt engineering focuses on crafting the perfect instruction in a single piece of text, context engineering isn't just a 'string' - it's a 'system' that runs before any AI processing takes place.
Context engineering allows users to dynamically generate context on the fly for the task at hand, ensuring that AI agents don't miss important details by providing useful information and tools only when the model needs them. Additionally, the way information is presented, or 'formatted,' also matters - for example, a concise summary is better than just handing over raw data.
Schmidt argues that building powerful, reliable AI agents is no longer about finding 'magic prompts' or model updates. Instead, he argues that the key to success going forward is 'context engineering,' which understands business objectives and provides the information and tools the AI needs to accomplish its tasks in the right format and at the right time.
Related Posts:
in Software, Posted by log1i_yk