← All courses

A Hands-On Course · 15 lessons

Prompt Engineering

Instructions that actually get followed — altitude, polarity, negative space, and the compliance ceiling.

Short lessons (~5–8 min each), each with one tangible win and a retrieval-practice quiz. Built for engineers who already use AI coding tools and want the non-obvious mechanics.

Grounded in the agentpatterns.ai corpus (CC BY 4.0). Keep the Glossary open as you go.

Part 1 · Calibrating the Instruction

1 The Goldilocks Zone An instruction can be too brittle or too vague. Both fail. The altitude in between is where a rule gets followed on inputs you never saw. 2 Say What To Do "Don't use var" makes the model hold a forbidden thing in mind. "Use const and let" gives it a target. The framing changes how often the rule sticks.

Part 2 · Making Rules Stick

3 Top and Tail Attention isn't uniform across a prompt. The middle is a trough. Put the one rule you can't afford to lose at both ends. 4 The Ceiling Every instruction set has a point past which adding rules subtracts compliance. The fix isn't better writing — it's fewer, better-placed rules. 5 Guardrails Beat Guidance For coding agents, the rule that helps is the one that closes a door. Positive advice — "follow the style," "write good tests" — measurably hurts.

Part 3 · The Right Vehicle

6 Rules or Examples A rule says "do it this way" and trusts the model to interpret. An example says "produce exactly this." Pick the wrong one and the agent invents its own intent.

Part 4 · Organizing the System

7 Table of Contents, Not Encyclopedia A rule you got right still fails if it's buried in a wall of others. The instruction file is its own context problem — and the fix is to make it a map, not the territory. 8 The Most Specific Rule Wins One file can't hold the conventions of a whole monorepo without becoming a tangle of conditionals. Layer the files by scope and the conflict resolves itself — by position. 9 Point at the Spec Some of what you'd write as a rule already exists in a more precise form. A type, a schema, a test — re-describing it in prose only adds a second source of truth that can drift.

Part 5 · Beyond the Prompt

10 When the Prompt Fades A rule placed perfectly at the start still loses its grip as the session runs long. The fix isn't a louder system prompt — it's a reminder injected at the moment it's needed. 11 Where Prompting Ends Every lever in this course raises the odds of compliance. None guarantees it. For the rules that must never fail, stop asking — and move them outside the model entirely. 12 The Re-read Protocol Compaction frees context by summarising the conversation — and quietly paraphrases your instruction files in the process. The rules survive on disk; their precision doesn't. The fix is a targeted re-read.

Part 6 · Assembling the System

13 The Production Stack A shipping system prompt isn't paragraphs of advice — it's a structured document with named sections, hard concern boundaries, and a layout dictated by the cache. Here's the architecture, read off one that ships. 14 Show Your Reasoning One example fixes the shape of an answer. A worked reasoning trace fixes the shape of the thinking behind it — and on multi-step tasks, that's where the wins are.

Capstone

15 The Compliance Stack Fourteen levers, one decision. Given a rule that isn't being followed, this is the order you reach for them — and when to stop reaching for prompts entirely.