Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

Glossary

Context engineering (context assembly)

Choosing and arranging what goes into a model's context window on each turn: the instructions, the tools, retrieved documents, memory and the conversation so far. Anthropic's engineering team defines it as curating the optimal set of tokens during inference, as against prompt engineering, which is writing the instructions.

Its techniques are just-in-time retrieval (keep a path or a query, load the data when it is needed), compaction of a long conversation, notes kept outside the context window and sub-agents that return a summary. For security the point is simple: everything assembled into the context is read as if it could be an instruction, so what retrieval brings in is the widest door into the loop.

Open the glossary in the Learning Center