Measured Academy Measured Academy
Français Pilot Progress 0

Module 2 · Lesson 1 of 4

Shape first, tools second

  1. What happenedA developer facing a model feature picks tooling first and inherits a shape nobody chose.
  2. Why it changedEach step up in shape moves something out of your source code, and the step from chain to agent moves the control flow itself.
  3. How it is measuredCount model calls per request and ask whether the order of steps can be read from the code or only from a record of the run.
  4. How to improve itAnswer the questions about the task in order and stop at the first shape that fits.
Decision path

Questions about the task, then a shape

Try it. Pick a task from the list, or describe your own, and answer yes or no at each question until you reach a shape.

Where this data comes from

Read from the book's saved record. Nothing here is simulated.

  • chapters/chapter-02-picking-your-stack.md "Architecture diagram description"

What happened

You are asked to put a model into a feature. The usual first move is to choose a library. A week later the feature has an orchestration graph, three prompts and a state object, and nobody decided it should.

The tooling arrived first, and the shape of the system came along with it.

Why it changed

A model-backed feature can take a small number of shapes, and they cost more as you go down the list:

Shape Who decides the steps Where you read what happened
Single call You, and there is one Your code
Chain You, in a fixed order Your code
Agent The model, at run time A record of the run
Several agents Several models, plus a coordinator Several records

Going from one call to a chain adds lines you can still read. Going from a chain to an agent is a different kind of step: the sequence of operations is no longer in your repository. That is the boundary this module cares about.

There is a second, quieter cost. Module 1 showed 10 of 20 distinct strings from one prompt (runs/ch1-sampling-2026-09-07.txt). Put three calls in a row and each one has to read text whose format moves. A chain adds steps and it also adds places where parsing can fail. Lesson 2 measures that.

How it is measured

Two questions you can answer about any design, before writing it:

  1. How many model calls per request? One, a fixed number, or unknown until it stops.
  2. Can you learn the order of steps by reading the code? If the answer is no, you need tracing from the first day, because the record is the only place the order exists.

Use the decision tree above on a task of your own. Every question on it is about the work. No question names a framework.

How to improve it

  • Describe the task first. Does it need information or actions that are not in the prompt? Do you know the steps and their order in advance? Does the number of steps depend on the input?
  • Stop at the first shape that fits. A capable shape is not a safe default; it is more to observe and more to maintain.
  • Let tooling follow shape. One call needs the provider's SDK. A chain needs a loop and a retry. An agent is the first shape where tracing, tool schemas and a step cap start to earn their place (Module 4).

The chapter's own framing is in Chapter 2 of the book, "The concept". Next: the chain that lost to one call.

Every number in this lesson, and the file it came from (1)
ValueFile in the book's recordConditions
10 of 20runs/ch1-sampling-2026-09-07.txt

Reference: Chapter 2, "The concept" and "Architecture diagram description".