Course 15 · Lesson 1 of 8

Free preview

Choosing the Pattern — Rule, ML, or LLM/Agent

Video lesson coming soon
We're filming this one. The full written lesson below is ready to study right now.

Architecture starts with refusing complexity you don’t need. The first decision is the shape of the solution — and reaching for an agent when a rule would do is the most common AI-architecture mistake.

The pattern ladder

Rule / heuristic
deterministic, debuggable, free
Classic ML
patterns in tabular data, measurable
LLM call
language/understanding, one-shot
RAG
LLM grounded in your knowledge
Agent
multi-step, tools, loops — last resort
Every rung up adds failure modes

Each step up the ladder adds latency, cost, non-determinism, and new ways to fail. Climb only when the rung below genuinely can’t meet the requirement.

Match shape to requirement

RequirementPattern
Deterministic policy, stable rulesrule engine
Predict a number/class from dataclassic ML
Understand/transform language oncesingle LLM call
Answer from your private docs, cite-ableRAG
Multi-step task using tools + stateagent (carefully)
Takeaway

Start at the bottom of the ladder and climb only when forced. Rules → ML → LLM → RAG → agent; each rung buys capability and pays in latency, cost and non-determinism.