← The syllabus

Module 05 · Context

Context engineering

Construct the world the model reasons inside.

What you’ll learn

Four ideas, one module

01

Anatomy of a context

System, user, history, examples, retrieved data and tool results.

02

Instructions vs data

Who wrote each part, and how far to trust it.

03

Order and hygiene

A deliberate order, and removing what pollutes the window.

04

Prompt injection

Why the prompt can’t fix it, and how systems defend in layers.

Applied exercise

Redesign an overloaded context

Redesign an overloaded assistant context with conflicting instructions, irrelevant history and poor retrieval.

  • Conflicting instructions
  • Irrelevant history
  • Poor retrieval
  • Ordering and trust

Cheat sheet

Treat the context like an API contract: every part needs an owner and a trust level

One page you keep: the questions to ask on every project, the rules of thumb, and a template you can use on your own product. All ten come with The Book.

Leave at the door

Five myths this module breaks

MythWhat’s actually true
Prompts fix itMost failures are what is in the window.
More context is saferIrrelevant tokens distract and mislead.
The prompt is secretIt can leak, and users talk around it.
Ask for JSONEnforce a schema. Validate always.
One line stops injectionNo prompt fixes it. Limit what it can do.

Before you move on

Can you call this one?

An email assistant forwards the inbox.

Where did the design fail?

Portrait of Jules Akari

The Context Alchemist

Jules Akari

experiments with the ingredients of a model's input, turning messy information into sharper intelligence.

Episode 05 · Context engineering

Included with the course.

An AI character from the show, not a real researcher.