Back

Lesson 2/2

0.1

The map

Artifact: the chapter you'd open first based on your current pain

1. The fourteen patterns, grouped by problem

The course is organized by the question a real engineer asks, not alphabetically. Read in order if you're new to AI engineering. Jump to a chapter if you already have a specific problem in front of you.

"My model gives me text. I need data." → Ch 1

  • Structured Outputs. Get JSON the model is contractually obligated to produce.
  • Output Validation. Catch cases where the JSON is valid but the business rules aren't.
  • Self-Critique. Have the model review its own output before you trust it.

"My model doesn't know what it needs to know." → Ch 2

  • RAG (Retrieval-Augmented Generation). When retrieval beats fine-tuning.
  • Query Decomposition. When one user question is really three.
  • Reranking. When your top-k retrieved chunks are mostly garbage.

"My model can't take actions on its own." → Ch 3

  • Tool Use / Function Calling. The foundational action pattern.
  • Agent Loops. When you genuinely need iteration (rarely).
  • Multi-Agent Orchestration. When one agent isn't enough (even rarer).

"My model is slow and expensive." → Ch 4

  • Caching. Prompt caching, semantic caching, when each applies.
  • Routing & Cascade. Cheap model first, expensive on escalation.

"My model gets things wrong." → Ch 5

  • Evals. The single most underrated pattern in AI engineering.
  • Guardrails. Input filtering, output validation, refusal handling.
  • Fallback. Graceful degradation when the model fails outright.

"My model has to remember." → Ch 6

  • Short-term memory. What to carry across turns, what to drop.
  • Long-term memory. Retrieval-backed, summarized, or both.

And finally → Ch 7

  • Anti-patterns — the "agent for everything" trap and the "single best model" trap.
  • How to choose and compose when you have several patterns to pick from.

2. How to read this

Two modes both work:

  • Front to back. Twenty-one short units, dense, finishable across a weekend. You'll come out with vocabulary for problems you've been hitting without naming.
  • Look up a pattern. Every unit is self-contained enough to read out of order. Use the syllabus on the course page as an index.

3. The honest test

If the pattern you named was implemented intentionally and by name, you've already graduated that chapter. If you implemented it without knowing it had a name — that's exactly what naming is for.

4. What's next

Chapter 1 starts with the most foundational pattern of all: getting the model to return data, not text.