What Is Context Engineering?
Prompt engineering focuses on instructions and demonstrations. Context engineering decides the complete information environment the model sees: instructions, conversation history, retrieved evidence, tool definitions/results, memory, schemas and modality inputs.
type ContextBundle = {
instructions: string;
userInput: string;
history: string[];
evidence: string[];
toolResults: unknown[];
};
Core principle
The best context is not the largest context. It is the smallest trustworthy set that lets the model complete the task while preserving required evidence and policy.
Practice
- How is context engineering broader than prompt engineering?
- Which context sources are untrusted by default?
- Why can adding more context lower quality?
- What should your context builder record for debugging?