# 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.

- Canonical URL: https://protologue.com/compare/prompt-engineering-vs-context-engineering/

## Prompt Engineering

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.
Entry: https://protologue.com/t/prompt-engineering/

## Context Engineering

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.
Entry: https://protologue.com/t/context-engineering/

## 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. https://arxiv.org/abs/2406.06608
- Anthropic (2024). Prompt engineering overview. https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview
- Anthropic (2025). Effective context engineering for AI agents. https://www.anthropic.com/engineering/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/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
