← All modules

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
“A better prompt fixes everything.”Most failures are what’s in the window.
“More context is always safer.”Irrelevant tokens distract and mislead.
“The system prompt is secret and binding.”It can leak, and users can talk around it.
“Ask for JSON and you’ll get it.”Enforce a schema if you can. Validate always.
“One line in the prompt stops injection.”No prompt fixes it. Limit what the system can do.

Before you move on

Can you call this one?

An email assistant summarizes a message, then forwards the inbox.

Where did the design fail? Which fixes live outside the prompt?

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.

Coming soon · an AI character from the show, not a real researcher.