Context Engineering
Context engineering is the practice of curating the information that large language models receive at inference time so that the model can perform a task reliably and cost-effectively. It treats the context window as a finite attention budget and looks for the smallest set of high-signal tokens that maximize the likelihood of the desired outcome. Context engineering subsumes and extends prompt engineering, system prompts, tool design, retrieval, agent loops, structured note taking, compaction, and multi-agent decomposition. It is a foundational discipline for building production AI agents and assistants.
APIs
Effective Context Engineering for AI Agents
Anthropic's engineering guide to context engineering, framing context as a finite attention budget and walking through system prompts, tool design, few-shot examples, just-in-ti...
Retrieval-Augmented Generation (RAG)
RAG is a context engineering pattern that augments LLM prompts with passages retrieved at inference time from a vector store, search index, or knowledge base. RAG keeps facts ou...
Prompt Engineering
Prompt engineering is the discipline of crafting model instructions and examples to guide model behavior. Prompt engineering remains a sub-discipline of context engineering and ...
Agentic Loops and Tool Use
Agentic loops are iterative reasoning patterns in which an LLM plans, calls tools, observes results, and refines its plan. Tool design is a central context engineering concern: ...
Long-Horizon Context Strategies
Long-horizon strategies handle conversations and tasks that exceed the context window. Techniques include compaction (summarizing history into a smaller representation), structu...