Sign in to watch this video
The written lesson, interview questions and practice are below — sign in to play the video lesson.
Sign inArchitecture 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
1
Rule / heuristic
deterministic, debuggable, free
2
Classic ML
patterns in tabular data, measurable
3
LLM call
language/understanding, one-shot
4
RAG
LLM grounded in your knowledge
5
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
| Requirement | Pattern |
|---|---|
| Deterministic policy, stable rules | rule engine |
| Predict a number/class from data | classic ML |
| Understand/transform language once | single LLM call |
| Answer from your private docs, cite-able | RAG |
| Multi-step task using tools + state | agent (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.