protologue

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 EngineeringContext Engineering
Unit of designA prompt or a few chained promptsThe full context at every step of a long-running system
Typical concernsInstructions, examples, output formatRetrieval, memory, compaction, tool definitions, subagents
Became commonWith early instruction-following modelsIn 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

  1. Schulhoff et al. (2024). The Prompt Report: A Systematic Survey of Prompt Engineering Techniques.
  2. Anthropic (2024). Prompt engineering overview.
  3. 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/

Markdown