Can I write a unit test that fully specifies the correct output for any given input?
Yes: no model. Stop here. The test refers to the output, not the input source — code that calls a database or a live API is still on the floor.
A Field Guide to Choosing the Right AI System — Before You Overbuild It
Complexity must be earned by a demonstrated failure of the simpler architecture, and every level up has a measurable price you can compute before you pay it.
Most GenAI systems do not fail because the model was wrong. They fail because nobody decided the architecture.
Somebody in a design review proposed an agent. Nobody in the room could say whether it was warranted, so it got built.
That is not a bad decision. It is the absence of a decision procedure.
This book supplies the procedure.
Seven of them are architectures. The eighth, Level 0, is the floor: no model at all. Open a rung to see what it adds, what makes it warranted, and the reproducible case that earns the next one.
UNROUTABLE — needs a human, because: the report is prose, not an
alert line. The missing capability, named: language understanding
over an input whose correct output no test can specify. There is no rule
to write.Primary risk Brittle if the input space is genuinely open.
Primary risk Confidently wrong, correctly formatted.
UNROUTABLE — needs a human,
because: no passage cleared the relevance floor. The runbook that
resolves it was in the corpus the whole time. Nothing was misretrieved and
nothing was misclassified — the retriever simply never returned it.Primary risk Bad retrieval yields fluent, well-cited errors.
Primary risk Errors compound across steps that cannot check each other.
Primary risk The model chooses, and side effects are real.
Primary risk Reasoning drift past step-level assertions.
Primary risk Cost and latency have no ceiling you set.
Primary risk Message passing as a new failure surface.
Level 7's measured row is a floor, because two of its three roles were never run live.
The gap between the cheapest architecture and an autonomous agent, on the same problem, at an unchanged per-token price. Structure produced all of it.
Which is why the cost chapter teaches estimation in calls and context growth rather than in dollars: prices move on the vendor's schedule, call counts move on yours. The durable claim is the ratio, not the dollar.
Run them in this order. The first one that fires settles the question.
Yes: no model. Stop here. The test refers to the output, not the input source — code that calls a database or a live API is still on the floor.
Yes: Level 5. No: Level 6. Level 5 executes a finite chain with a defined end; Level 6 runs an unbounded loop that decides its own termination.
Compute R, the crew's coordination cost over what one agent costs. The crew must reach agent accuracy × R, and no crew can break even above an agent accuracy of 1/R.
The default outcome is the floor. You land higher only because a question forced you there, and the thing that forced you is written down.
| # | Question | If yes |
|---|---|---|
| 1 | Can a test fully specify the correct output? | Level 0 — stop |
| 2 | Has specialization been measured to beat one system? | Level 7 |
| 3 | Is the maximum model-call count unstateable upfront? | Level 6 |
| 4 | Does the next step depend on the last result? | Level 5 |
| 5 | Does it need live data, or an action with effects? | Level 4 |
| 6 | Are there several calls in an order you can draw? | Level 3 |
| 7 | Does the answer depend on facts outside request and model? | Level 2 |
| 8 | None of the above forced you upward | Level 1 |
Question 2 is answerable only with an A/B result in hand; absent one, the honest answer is no.
Each rung chapter takes the same incident-triage problem one rung higher, shows the code, measures it against those columns, and closes with a Failure Receipt: a reproducible case the rung demonstrably cannot handle, printed as the actual failing output. That receipt is what earns the next chapter. Nothing here is climbed on a hunch.
To climb, you produce a Failure Receipt naming a missing capability, not a missing quality. If you sit down to write one and cannot, the finding is that you do not need to climb.
You have shipped at least one LLM feature. You can read Python, you have opinions about your stack, and you have sat in a design review where somebody proposed an agent and nobody in the room could say whether it was warranted.
The platform or staff engineer who needs something better than instinct. Half the value here is in the receipts and the tests, because those are things you can hand to someone who disagrees with you.
You do not need to have built a retrieval pipeline or an agent. You do need to be comfortable being told that a system you already shipped is a rung too high.
One incident-triage system built across all sixteen chapters, one tagged increment per chapter. The test suite passes with no API key set — every figure in Parts I and III, and the structural half of every rung chapter, regenerates from committed recordings rather than from live calls.
The simulated environment is deterministic, so an example that worked when the book was written still works years later: six seeded incidents, twelve markdown runbooks, a fake metrics API, a synthetic log store, and the executable ground truth Chapter 13 scores against.
Where a figure could not be measured honestly, the book says so on the page rather than inventing one. There are several such places and they are marked.
github.com/ranjankumar-gh/escalation-laddergit clone https://github.com/ranjankumar-gh/escalation-ladder
cd escalation-ladder
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
This is not an argument against agents.
The top rung is built here, measured here, and given the fairest test its author could design. What this book argues against is complexity that nobody decided to buy.