Context Engineering
Designing what goes into the model's context window.
- Prompt Engineering vs Context EngineeringIntermediate
Prompt engineering writes the instruction; context engineering designs everything the model sees on each call — retrieval, tools, memory, history, and budget.
- Selection & PrioritizationIntermediate
Treat the context window as a budget — keep instructions and the current question, select only relevant retrieval and tools, and drop or compress the rest.
- Context CompressionAdvanced
When the window fills, trim bulky tool output first, then compact old turns into state — prefer deletion over rewriting, and trigger on a token or turn threshold.
- Context CachingAdvanced
Prompt caching reuses the KV cache of a stable prefix so you don't re-prefill tools and instructions every turn — any change in that prefix busts the cache.
- Long-Context StrategiesAdvanced
A long advertised window is not a long effective brain — retrieve instead of dumping, and put key facts at the edges.
- State ManagementIntermediate
State is the structured progress you persist outside the raw transcript — using write, select, compress, and isolate so the next call gets a clean working set.