Part I · Novice
Chapter 1
The clerk with three stamps
Software does not want a letter. It wants an answer it can act on. Meet the clerk who gives exactly three kinds of answer, and the office that does everything else.
On this page
In this chapter, we will learn what a decision model is and why software wants one. We will meet Rosa, who runs a maintenance desk, and the clerk with three stamps who will stay with us for the whole book. We will look at one real answer, and at one measured result that the rest of the book explains.
Software needs an answer it can branch on
A decision is a judgment whose possible answers are known before the question is asked. "Which trade?" has six possible answers. "May we enter the flat?" has two. A program can act on such an answer directly, because it can take a different path for each one. Programmers call this branching.
Rosa runs the maintenance desk at Harbor Court, a building of 120 flats. Tenants write to her about a dripping ceiling, a dead socket, a cold radiator, mice, a jammed lock. For every message the desk must make three decisions: which trade to send, how severe the problem is, and whether the tenant has given permission to enter while they are out.
The usual way to get such judgments from a machine is to ask a language model, the kind of model behind a chat assistant. It produces text, one small piece after another. We call it the letter writer. Here is a reply that one of them, gpt-5.1, really wrote in one of our experiments.
example: Thanks for letting us know about the loss of cold water in flat 14B; loss of water is treated as an essential service, so we will attend **within 4 hours**. We will let ourselves in with the master key, as you agreed.
It is a good letter. Now read it as a program must. Which trade should be booked? The letter does not say. How severe is it? The phrase "essential service" sits in the middle of a sentence. To act on this, code has to search the text for the answer. That is called parsing, and it can break when the writer chooses different words.
TypeSafe, the company we meet below, describes the mismatch in its documentation: "you are coercing a text-generation system into outputting structured decisions, then parsing the results back into something your code can depend on."
The letter is also slow and costly, because every word has to be produced. A later section of this chapter puts numbers on both.
Three stamps, three kinds of answer
A stamp is an answer with a fixed shape: a name from a list, a number from 0 to 1, or a position on a scale. The clerk has no fourth stamp.
| Stamp | Its name in this book | Rosa's question | What comes back | What code does with it |
|---|---|---|---|---|
| Tray stamp | Choice | Which trade should handle this request? | one of six names, such as plumbing | one path per name |
| Yes/no dial | Noul | The tenant has given permission to enter the flat while they are out. | a number from 0 to 1 | an if with a line you choose |
| Ruler | Score | How severe is the problem described? | a position from 0 (cosmetic) to 3 (danger) | sort, or compare with a line |
The names Choice, Noul and Score are the vendor's. Each gets a chapter:
Chapter 3, Chapter 4 and
Chapter 5. The last column follows the vendor's chief executive, who
wrote in a public forum that Choice maps to a match statement, Noul to an if
statement and Score to sorting.
Not every job is a stamp. The test is always the same: if every possible answer can be written down before the paper arrives, it is a stamp. If the answer is new text, it is a letter. Below are ten jobs from Rosa's desk. Predict how many of the ten the clerk can do alone, then sort them.
What a decision model is, and what the names mean
A decision model is a model that reads text and returns typed answers with probabilities, and no generated text. "Typed" means the answer has a fixed shape that a program can rely on. A probability is a number from 0 to 1 that says how likely something is. The decision model is our clerk. Four names are in use.
- Jev is the decision model we use in this book. It is made by a company called TypeSafe AI, which announced it on 15 September 2026. TypeSafe says the name honours the economist William Stanley Jevons.
- System One model is TypeSafe's name for this kind of model. The documentation says it comes from Daniel Kahneman's book Thinking, Fast and Slow, where System 1 thinking is fast and intuitive and System 2 is slower and more deliberate.
- Decision model is the generic term, and the one we prefer. OpenRouter, the service through which our experiments call Jev, describes it as "a structured decision model".
- The Decisions API is a similar product from OpenAI, in public beta as we write. We could not call it ourselves, so Chapter 17 rests on OpenAI's published guide.
One honest limit. TypeSafe has not disclosed how Jev works inside. It says that it uses a new architecture, a parallel sampler and a training method of its own. When this book says what Jev does, it means what we sent and what came back. Chapter 18 collects the hypotheses and labels them as such.
One glance at a real answer
A call is one message sent to the model and one answer received. Experiment 0001 made a single call: one tenant message and Rosa's three questions. Below are a few lines of what the program printed. A line of three dots marks a cut.
"state": "Tenant message, flat 4B: Water is dripping through my bathroom ceiling light. It started an hour ago and it is getting faster. I am at work until 6, you can let yourself in.",
...
"choice": "plumbing",
...
"score": 2.99,
...
"noul": 0.98
...
"input_tokens": 625,
The first line is the state, the vendor's word for the paper on the desk. Three stamps
came back. The tray stamp says plumbing. The ruler says 2.99 on a scale that
ends at 3, which is danger. The dial says 0.98 that the tenant gave permission to enter. Nothing needs
parsing.
The last line is the bill. A token is a small piece of text, a word or part of a word, and it is the unit that models charge for. TypeSafe's published price is $0.042 per million input tokens, and the answer itself is free.
tokens read 625 price $0.042 per 1,000,000 tokens cost of this call 625 x 0.042 / 1,000,000 = $0.00002625
The answer arrived 311 milliseconds after we sent the question. Chapter 2 reads the whole request and the whole answer, field by field.
Let the model stamp, and let the office work
The thesis of this book is one sentence: let the model stamp, and let the office work. The model makes the judgments. Ordinary code does everything else: it looks up the rule, fills in a reply from fixed phrases, and hands the paper to a person when the clerk was unsure.
We tested this on Rosa's desk (experiment 0017). The job: read a tenant's message and send a reply that states the right response time and the right rule about entering the flat. In way 1 the clerk stamps and the back office assembles the reply. In way 2 the letter writer reads the same policy and writes the whole reply.
test requests: 107 ... WAY 1: stamp and office (Jev + code + templates) answered automatically 94 of 107 (87.9%) handed to a person: 13 automatic replies fully right 93 of 94 (98.9%) wrong response time: 1 wrong access line: 0 of the 13 handed to a person, Jev's level was wrong on 3 ... latency p50 250 ms, p95 386 ms; the code after the model call took 7 microseconds at most cost per 1,000 requests $0.029 ... WAY 2: letter writer (gpt-5.1) replies fully right 95 of 107 (88.8%) wrong or missing response time: 11 wrong or missing access line: 1 ... latency p50 1281 ms, p95 1584 ms cost per 1,000 requests $0.953
Latency is the waiting time for one answer. "p50" is the middle value: half of the calls were faster. "p95" is the slow end: 95 of 100 calls were faster.
way 1, sent without a person 94 / 107 = 87.9% way 1, right among those 93 / 94 = 98.9% way 2, right 95 / 107 = 88.8% wrong replies sent, way 1 94 - 93 = 1 wrong replies sent, way 2 107 - 95 = 12 cost, way 2 against way 1 $0.953 / $0.029 = 32.9 times waiting time, way 2 / way 1 1,281 / 250 = 5.1 times
Read this fairly. The letter writer answered all 107 requests and got 95 right. The desk answered 94 on its own and got 93 right, so it did not get more requests right in total. What it did was different: it knew which 13 it was unsure about and gave those to Rosa. The letter writer sent 12 wrong replies, and nothing said which ones.
What this book covers
The book has five parts, and each one ends with something you can do.
| Part | Chapters | After it you can |
|---|---|---|
| I · Novice | 1 to 6 | make a call, read all three stamps, say what "how sure" means |
| II · Apprentice | 7 to 12 | shape the state, write good questions, move the work into the back office |
| III · Journeyman | 13 to 16 | name where the clerk fails, defend against hostile text, do the cost arithmetic |
| IV · Ninja | 17 to 20 | read OpenAI's version, reason about what might be inside, use the named patterns |
| V · Practice | 21 to 24 | build the whole desk and defend it on a whiteboard |
Every number is one of three kinds, and we say which. Measured: one of our programs printed it. Published: a vendor's page says it. Derived: arithmetic on the first two, shown step by step.
Try it yourself: five hidden decisions
Take a desk you know well: a school office, a library counter, a help desk. Write down five decisions that someone makes there many times a day. For each one, write the possible answers.
Then sort your five. A list of names is a tray stamp. A yes or no is a dial. A "how much" with steps you can describe is a ruler. If you cannot list the answers in advance, you have found a letter, not a decision. Keep the list for Chapter 10, which splits such a job between the clerk and the back office.
Common questions
Can I not just tell a chat model to answer with one word?
You can. Experiment 0003 had gpt-5.1 answer Rosa's three questions in a fixed short form, three named values and no sentences. It got all three right on 96.7% of 215 requests against 92.1% for Jev, and it has a home advantage on this data. Its middle call took 1,064 ms against 251 ms, and it cost $0.756 per 1,000 requests against $0.029. Its reply carries no number for how sure it was.
Is a decision model always right?
No. TypeSafe's own site says Jev "guarantees the shape of its answers, not that every decision is correct". It can pick the wrong one of six trades. In our test one automatic reply in 94 promised the wrong response time.
Does the clerk replace the letter writer?
No. A decision model writes no text at all. When a tenant needs an apology or an explanation, the letter writer is still the right tool. The claim of this book is narrower: do not use the letter writer for stamps.
Do I need to know how Jev works inside to use it?
No. The design is not public. We study what goes in and what comes out, and we measure.
Carry this
- A decision has answers you can list in advance. Software can branch on it without parsing.
- Three stamps: Choice (which tray), Noul (yes or no, as a number from 0 to 1), Score (where on a scale).
- One real call: 625 tokens, 311 ms, $0.00002625.
- Let the model stamp, and let the office work. On 107 synthetic test requests the desk sent 94 replies alone and 93 were right. gpt-5.1 writing letters got 95 of 107 right, at 32.9 times the cost.
Check yourself
1. A desk handles 2,000 requests a month, and each call reads 625 tokens. What does a month of stamping cost at $0.042 per million tokens?
Answer
tokens per month 2,000 x 625 = 1,250,000 cost 1,250,000 x 0.042 / 1,000,000 = $0.0525
2. "Write a polite note telling the tenant when the plumber will come." Stamp or letter? Can any part of it be a stamp?
Answer
As asked, it is a letter. But the judgments inside it are stamps: which trade, how severe, may we enter. Once those are stamped, the back office can fill a prepared reply with the right time. That is what way 1 did.
3. In our test the desk handed 13 of 107 requests to a person. Why is that a feature and not only a cost?
Answer
Because the desk chose them. They were the requests where the clerk was unsure, and on 3 of the 13 the clerk's level was in fact wrong. The letter writer sent 12 wrong replies with no signal.