Prompt & Context Engineering
Go beyond wording: decide what the model sees, how much, in what order and in what structure. Token budgets, retrieval packing, compression, memory, caching, structured output and untrusted content, with every snippet run.
What you'll learn
- Explain the difference between writing a prompt and engineering the whole context a model sees.
- Budget a context window across instructions, examples, history, documents and the answer.
- Select, de-duplicate, compress and order retrieved content so the most useful facts fit and stand out.
- Manage conversation history, long-term memory and large tool outputs in multi-turn and agent systems.
- Structure prompts for caching, structured output and resistance to untrusted content.
- Evaluate context strategies with ablations instead of guesswork.
Syllabus
From Prompts to Context
Budgeting the Window
Selecting What Goes In
- Packing Retrieved Chunks Into a Budget
- Removing Near-Duplicates
- Compressing Content
- Selecting Few-Shot Examples per Request
Ordering and Structure
History, Memory and Tool Output
Caching, Output Contracts and Versioning
- Structuring Prompts for Caching
- Structured Output as a Contract
- Versioning Prompts and Context Pipelines
Untrusted Content, Privacy and Grounding
- Prompt Injection Through Context
- Data Minimisation in Context
- Grounding, Citations and Saying Not Found