Context engineering
The practice of choosing what an AI model sees before you ask it anything: instructions, examples, files, and history, in the right order and nothing extra. Prompting is the question. Context engineering is everything around it, so the first answer is usable instead of generic. It is the skill behind every AI setup that "just works."
In plain English
Prompting is what you say. Context engineering is what you put on the desk before you say it. Karpathy’s version: “the delicate art and science of filling the context window with just the right information for the next step.”2 Lütke’s is shorter: give the model all the context it needs for the task to be plausibly solvable.2
In the real world
- A Claude Project or custom GPT with three files and a one-page brief.
- A
CLAUDE.mdor Cursor rules file sitting in a codebase. - The system prompt behind a support bot that you never see.
- A template pasted at the top of every chat because “it works better that way.”
When to use it
- Any task you’ll ask for more than once.
- Anything with a house style, a template, or a rulebook.
- When the first answer keeps coming back generic. That’s not the model being dumb. That’s an empty desk.
When not to use it
- One-off questions. Just ask.
- When you can’t describe a good answer yet. You can’t brief what you can’t picture.
- Don’t paste the whole company wiki “just in case.” Anthropic’s guidance: treat the model’s attention as a budget, and find the smallest set of information that gets the result.1 That’s a context window problem with extra steps.
Good, bad, ugly
- Good: boring, repeatable results. Far less rewriting.
- Bad: setup is work. Someone has to write the brief and keep it current.
- Ugly: stale context. A six-month-old brief confidently steering every answer in the wrong direction, and nobody remembers it’s there.
Key facts
- Builds on
- The context window. You are managing a fixed amount of space.
- Term popularized
- June 2025, by Shopify CEO Tobi Lütke and Andrej Karpathy, as a replacement for "prompt engineering"
- Where it lives
- Claude Projects, custom GPTs, system prompts, and rules files in a codebase
- Smallest version
- A one-page brief and the one file that matters
Common questions
Is this the same as prompt engineering?
No. Prompting is how you word the question. Context engineering is everything the model sees around the question, including what you leave out.
Do I need to be technical?
No. A clear brief, the right file, and an example of a good result is context engineering. The technical version is the same thing in a config file.
Where do I put the context?
Wherever your tool keeps standing instructions. Claude Projects, a custom GPT, a system prompt, or a rules file like CLAUDE.md in a codebase.
References
- Effective context engineering for AI agentsAnthropic Engineering · 2025-09-29View source
- Context engineeringSimon Willison's Weblog · 2025-06-27View source