Mental Model
Context Engineering vs Prompt Engineering
A practical boundary between Claude prompt engineering and context engineering, grounded in Anthropic source material.
"Context is a critical but finite resource for AI agents."
Source: Effective context engineering for AI agents, Anthropic Engineering.
Prompt engineering writes the contract. Context engineering manages the workspace.
Prompt engineering is still real work: clear instructions, examples, roles, output formats, and XML or Markdown structure all help Claude understand what to do. Anthropic's prompting docs continue to recommend direct instructions, relevant examples, and explicit formatting guidance.
Context engineering is broader. It asks what information should be present for this call, what should be retrieved later, what should be summarized, what should be cached, what should be hidden behind tools, and what should be kept out entirely. For agents, that choice repeats at every step.
Why the term matters for Claude work
The term prevents a common mistake: trying to fix every failure by rewriting the prompt. If Claude misses a requirement, the issue might be an unclear instruction. But it might also be missing source material, too many irrelevant files, stale memory, unhelpful tool output, or a conversation that should have been compacted twenty turns ago.
A context-engineering review therefore starts with the state, not just the words. Inspect the instruction hierarchy, source freshness, examples, active tool list, retrieval behavior, message history, and output constraints. Then change the smallest layer that explains the failure.
Use the right lever
When the model misunderstands a task, improve the prompt. When it lacks facts, improve retrieval or source packets. When it forgets the middle of a long run, compact or write durable notes. When tool results dominate the window, clear old results or return smaller summaries. When the same giant prefix repeats, use prompt caching.
- Instruction failure: rewrite the prompt with concrete steps and examples.
- Knowledge failure: retrieve or attach better source material.
- Long-run failure: compact, use memory, or split work into subagents.
- Tool-noise failure: reduce tool surface area and clear re-fetchable results.
- Cost or latency failure: cache stable prefixes and avoid needless bulk.
Where this site stops
ClaudeContext.com focuses on the information architecture around Claude calls. For deeper Claude memory examples, the natural sibling is Claude Memories. For broad Claude Code workflow and CI practice, use Claude Ships Code. This site links those topics where they affect context, but does not duplicate their lane.
FAQ
Is context engineering just RAG?
No. Retrieval is one context-engineering tactic. Context engineering also covers instructions, examples, tools, memory, tool results, summaries, caches, and conversation history.
Is prompt engineering obsolete?
No. Prompt engineering remains one layer of context engineering. Clear instructions and examples still matter.
Sources Used
- Effective context engineering for AI agents, Anthropic Engineering. Accessed 2026-07-06. Primary explanation of context engineering, context pollution, compaction, note-taking, and sub-agent architectures.
- Prompting best practices, Claude Platform Docs. Accessed 2026-07-06. Official guidance on clear instructions, examples, XML sections, long-context prompting, and tool-use prompting.
- Context windows, Claude Platform Docs. Accessed 2026-07-06. Official context-window behavior, token accumulation, extended thinking and tool-use accounting, and compaction guidance.
Cite this page
Suggested citation: Claude Context, "Context Engineering vs Prompt Engineering," updated 2026-07-06, https://claudecontext-com.pages.dev/context-engineering/.
This page is an independent educational resource and is not affiliated with Anthropic.