Prompt Engineering vs Context Engineering
Prompt engineering is the craft of wording and refining a prompt so a model reliably produces the desired output. Context engineering is broader, covering everything a model sees at each step of an agent's run, including instructions, tools, retrieved data, memory and history, and deciding what enters and leaves a limited context window over time.
Definitions
- Prompt Engineering PTL-0002
- Prompt engineering is the practice of designing, testing, and iteratively refining prompts so that a language model reliably produces the desired output for a task.
- Context Engineering PTL-0072
- Context engineering is the practice of curating the full set of tokens a model sees at each step, including instructions, tools, retrieved data, memory, and conversation history, to maximize the chance of the desired behavior within a limited attention budget.
Differences
| Prompt Engineering | Context Engineering | |
|---|---|---|
| Unit of design | A prompt or a few chained prompts | The full context at every step of a long-running system |
| Typical concerns | Instructions, examples, output format | Retrieval, memory, compaction, tool definitions, subagents |
| Became common | With early instruction-following models | In 2025 as agents ran for many steps |
Which to use
- Think in terms of prompt engineering for single calls and short pipelines.
- Think in terms of context engineering for agents and long conversations, where what to leave out matters as much as what to include.
Sources
- Schulhoff et al. (2024). The Prompt Report: A Systematic Survey of Prompt Engineering Techniques.
- Anthropic (2024). Prompt engineering overview.
- Anthropic (2025). Effective context engineering for AI agents.
Cite this page
Protologue. (2026). Prompt Engineering vs Context Engineering. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0). https://protologue.com/compare/prompt-engineering-vs-context-engineering/