Context engineering

Context engineering is the practice of designing and curating the full context window provided to a large language model — including system prompts, retrieved documents, conversation history, tool outputs, structured data, and other information. The objective is to improve the quality, relevance, and accuracy of model outputs.

As models are increasingly deployed in agentic and multi-step workflows, context engineering becomes more important than prompt engineering alone.

Prompt engineering

Prompt engineering is the practice of designing and refining the instructions given to a model — primarily the system prompt — to elicit better, more accurate, or more useful outputs. It is a subset of context engineering.

Because LLMs are sensitive to how questions and instructions are phrased, the structure and content of a prompt can significantly affect the quality of the response. Techniques include providing clear task descriptions, few-shot examples, explicit output format instructions, and chain-of-thought prompting.

There are two categories of prompts:

  • Conversational prompts: The messages a user sends in a chat interface.

  • System prompts: Behind-the-scenes instructions that developers bake into a product to shape the model’s behavior before the conversation begins.