---
title: Context Engineering — AI Glossary
description: Context engineering is the discipline of designing everything a model sees at inference time — system instructions, retrieved documents, tool definitions, examples, memory, and conversation history — so the right information reaches the model in the right form. It broadens prompt engineering to the full working context around a request.
canonical: https://prompeteer.ai/glossary/context-engineering
---

# Context Engineering

Context engineering is the discipline of designing everything a model sees at inference time — system instructions, retrieved documents, tool definitions, examples, memory, and conversation history — so the right information reaches the model in the right form. It broadens prompt engineering to the full working context around a request.

## Definition

As applications move from single prompts to agents and retrieval pipelines, quality depends less on one clever instruction and more on how the entire context window is assembled. Context engineering treats that assembly as a design problem: what to retrieve, how to chunk and order it, what tools to expose, what to remember, and what to leave out.

Done well, it keeps the model grounded and focused while respecting the token budget and avoiding the degradation that comes from cramming in irrelevant material. It sits at the center of building reliable agentic and RAG systems.

## Sources

- [Anthropic — Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
- [Liu et al. (2023), Lost in the Middle: How Language Models Use Long Contexts](https://arxiv.org/abs/2307.03172)

## Related terms

- [retrieval-augmented-generation](https://prompeteer.ai/glossary/retrieval-augmented-generation)
- [context-window](https://prompeteer.ai/glossary/context-window)
- [chunking](https://prompeteer.ai/glossary/chunking)
- [prompt-template](https://prompeteer.ai/glossary/prompt-template)
- [system-prompt](https://prompeteer.ai/glossary/system-prompt)
