Vibe Engines
YouTube
AI System Design

Design Jev

Learn AI system design by designing a decision layer around a model like Jev, a model that does not write.

The numbers to beat3typed box kinds1field your code reads0free-text parsers

The whole design, in writing

Learn AI system design by designing a decision layer around a model like Jev, a model that does not write. An interactive guide covering why 60 tokens at 20 ms is 1.2 seconds and $30,000 a day against one pass at 0.1 seconds and $400, the typed question sheet, the single pass that fills every box at once, the calibrated probability and the squared penalty that trains it, the threshold that comes from the cost of a mistake (96% for a $50 refund), the cascade that cuts a $30,000 bill to $3,400, fresh state fetched in code, and the weekly audit that catches a confident answer on traffic that has changed.

Every step of the build above, written out: the problem each piece solves, the option that was taken and the ones that were not, the numbers, and how it fails in production.

The big idea

"Design a decision layer" — why is this even hard?

A customer writes: my card was charged twice. Your system has to decide what happens next. A chat model reads it and writes a reply, one small piece at a time, and a second later you have a paragraph your code must now read. Say 60 tokens at 20 ms is 1.2 seconds, and at 3 cents a ticket a million tickets is $30,000 a day to choose one word.

Ticket“my card was charged twice”
New in this step: Ticket.

Use a different kind of model: one that does not write. Hand it a typed question sheet, let it fill every box in one pass with an honest probability for each, set the bar for acting by what a mistake costs, send only the hard cases up a cascade, fetch fresh state in code, and audit the number on your own traffic every week.

What the new pieces do

Ticketclient
One customer message. It is a sentence your code cannot use directly: the whole design is about turning it into typed answers and then into an action.

Step 1 · The question sheet

Hand over questions, not a prompt

The obvious build keeps the chat model and asks it to reply with just the category. Your code reads Billing. Billing issue. Looks like billing, I think. Billing, probably. Four spellings of one answer, and your code needs exactly one. What should you hand the model instead?

Ticket“my card was charged twice”Question Sheettyped boxes, not text
New in this step: Question Sheet.

What should the input to a decision model look like?

  1. You can add rules, a parser and a retry, but you are still parsing free text, and it will still drift.

  2. The model can only fill boxes of those types, so the output is always the type your code expects.

  3. That is free text again, with nothing to say which answer your code should read.

The Question Sheet: a choice among options you define (billing, technical, sales), a score on a scale (how urgent?), and a yes or no with a probability (is it a refund request?). It fills the boxes. It cannot write a paragraph, so it cannot drift.

Why this piece earns its place

Typing the output moves a whole class of failure out of your code. A model that can only fill a box cannot return four spellings of one answer, cannot add an apology, and cannot invent a seventh option; your code reads one field and gets the type it declared. Public documentation describes this shape: a request carries a state and typed questions, with a choice of up to 255 options, a score on a small level scale, or a yes or no, and each comes back as a typed value with a calibrated probability. The honest limit is that the model can still pick the wrong box. The price is real too: you must know your questions in advance, and there is no free-form fallback if you did not think of one.

  • 3typed box kinds
  • 1field your code reads
  • 0free-text parsers

What the new pieces do

Question Sheetsheet
A sheet of typed questions: a choice among options you define, a score on a scale, a yes or no with a probability. The model can only fill the boxes, so it cannot drift into free text.

Step 2 · One pass

Every box, one trip through the model

A writing model picks a token, feeds it back, then picks the next. Sixty tokens is sixty trips and each waits for the one before. There are ten things you would like to know about this ticket. Ask them one at a time and you wait ten times. What changes if the model has no sentence to write?

Question Sheettyped boxes, not textDecision Model0.1 s · $400 a day
New in this step: Decision Model.

Ten typed questions on one ticket. What does it cost, against asking one?

  1. That is how a writing model works. A decision model has no sentence to build token by token.

  2. Difficulty is not the point. The point is whether the answers depend on one another being written first.

  3. Choice, score and yes or no come out of one trip. A tenth question barely slows it.

The Pass: a writing model needs 60 tokens × 20 ms = 1.2 s and about $0.03 a ticket; a decision model answers in one pass, 0.1 s, about $0.0004. That is 12× faster and, over a million tickets, $30,000 against $400, 75× cheaper.

Why this piece earns its place

The speed comes from a structural fact, not a trick. Writing is sequential because each token depends on the last; a decision has no sentence to write, so every box can be filled in the same trip. That is why ten questions cost about what one costs, and why you should ask everything you might need at once: category, urgency, refund, language, anger. The price is that you get no reasoning to read afterwards, only values and numbers. And this is the easy half of the design. Fast and cheap are what you notice first, but they say nothing about whether the answer is right or whether you can act on it, and the rest of the design exists for exactly that.

  • 12×faster, 1.2 s → 0.1 s
  • 75×cheaper, $30,000 → $400
  • 10questions, one pass

What the new pieces do

Decision Modelmodel
A model that does not write. It reads the sheet and fills every box in the same trip, each with a probability: about 0.1 seconds and $0.0004 a ticket, against 1.2 seconds and $0.03 to write the answer.

Step 3 · The honest number

What does “90%” have to mean?

Every answer carries a probability. Ask the chat model how sure it is and it says 95%, every time. Check: of a hundred tickets it called 95, 72 were right. A confident number that means nothing is worse than none, because you cannot set a bar on it. What should a probability mean, and how do you train it?

Honest Numbera calibrated probabilityDecision Model0.1 s · $400 a day
New in this step: Honest Number.

How do you train a model so that its “90%” is trustworthy?

  1. Say 0.9 and be right: 0.01. Say 0.9 and be wrong: 0.81. Wrong with confidence hurts most, so honesty is the only winning move.

  2. That teaches it to be right, but not to say how sure it is. Boasting costs it nothing.

  3. An explanation is more text. It does not make the number match how often it is right.

Calibrated: of 100 answers called 90%, about 90 are right. Trained with a squared penalty. If the truth is 9 in 10, claiming 90% loses 0.09 on average and claiming 99% loses 0.0981: boasting costs more than honesty.

Why this piece earns its place

The squared penalty is a proper scoring rule: the expected loss is lowest when you report the probability you actually believe. Work it through for a truth of nine in ten. Claim 90% and you lose 0.01 nine times in ten and 0.81 once, an average of 0.09. Claim 99% and you lose 0.0001 nine times in ten and 0.9801 once, an average of 0.0981. Over millions of examples the honest claim wins. Public documentation describes the recipe as reinforcement learning for calibrated decisions, and that is the idea in one line. The caveat belongs here and not later: calibration is a property measured on a body of traffic, so a model is only as honest as the traffic it was measured on.

  • 90 in 100called 90% are right
  • 0.01 / 0.81right / wrong at 0.9
  • 0.09 vs 0.0981honest vs boasting

What the new pieces do

Honest Numberscore
Each answer comes with a probability. Calibrated means that of 100 answers called 90%, about 90 are right. It is trained with a squared penalty so that boasting does not pay.

Step 4 · The threshold

The bar comes from the cost of a mistake

Now the number can drive an action with no second question. A ticket sent to the wrong team costs a reroute, so routing at 60% is fine. But a refund approved by mistake costs $50 and a person checking it costs $2. Where do you set the bar for approving a refund automatically?

Honest Numbera calibrated probabilityThresholdrefund above 96%Decision Model0.1 s · $400 a dayActionapprove · person · route
New in this step: Threshold, Action.

What decides how sure it must be before a refund is approved automatically?

  1. At 90% sure a mistake costs about $5 on average, more than the $2 review. A comfortable number is a feeling.

  2. Break even is where the expected loss of approving equals the cost of checking. Above it approve, below it a person looks.

  3. The model does not know what a wrong refund costs your business. That price is yours to set.

The Threshold: break even at 1 − 2/50 = 96%. Above, approve; below, a person looks. At 90% sure a mistake costs $5 on average, so send it to a person; at 99% it costs 50 cents, so approve it. Routing a ticket can sit at 60%.

Why this piece earns its place

This is where an honest number earns its keep. Because 90% really means nine in ten, the expected cost of acting is a plain product: the chance of being wrong times the cost of being wrong. At 90% that is 0.1 × $50 = $5, above the $2 review. At 99% it is 0.01 × $50 = $0.50, well under. The break-even is where chance of error equals review cost divided by mistake cost, so the bar is 1 − 2/50 = 96%. Notice what this requires: someone must put a price on every mistake, and different actions get different bars. It also fails entirely on a number that is not calibrated, which is why the previous step comes first.

  • 96%refund bar
  • $50wrong refund
  • $2one review

What the new pieces do

Thresholdrule
Plain code that turns the number into an action. The bar comes from the cost of a mistake: a $50 wrong refund against a $2 review is 1 − 2/50 = 96%.
Actionaction
What actually happens: approve the refund, route to a team, or send to a person. Chosen by the bar, with a second check in code for anything that moves money.

Step 5 · The cascade

Cheap first, a writer only for the hard ones

A million tickets a day and every one needs a decision, but some need more than a decision: a reply a customer will read. Sending everything to the writing model is the $30,000 bill again. How do you spend the expensive model only where it earns its keep?

Cascade1 in 10 climbs · $3,400Writing Modelslow, for the hard ones
New in this step: Cascade, Writing Model.

One ticket in ten is hard. How should the work be split?

  1. That is $30,000 a day, to answer nine tickets in ten that a single pass already settles.

  2. It cannot write text. The cases that need a reply or open reasoning still need something that can.

  3. $400 for a million tickets plus 100,000 × $0.03 = $3,000: $3,400, almost nine times cheaper.

The Cascade: the decision model on all a million tickets is $400; the writing model on a tenth, 100,000 × $0.03, is $3,000. $3,400 against $30,000, almost 9× cheaper. The confidence is the router: a low number is the signal to climb.

Why this piece earns its place

A cascade is cost following difficulty. Plain code answers what code can answer, such as order status; the decision model sorts; only what stays uncertain climbs. Notice that the router is not a new component with its own judgment: it is the same honest number, compared with a bar. That is another reason calibration matters, since a miscalibrated model routes the wrong tickets upward. The writing model keeps the job only it can do, which is writing the reply the customer reads. The price is real: one more thing to run, to monitor and to keep in step, and a fraction that climbs when traffic changes will change the bill with it. The one-in-ten figure is an assumption to measure on your own traffic, not a constant.

  • $3,400vs $30,000 a day
  • ~9×cheaper
  • 1 in 10climb to the writer

What the new pieces do

Cascaderouter
Every ticket meets the cheap model first. A low confidence is the signal to climb, so only the hard cases, say one in ten, reach the writing model.
Writing Modelwriter
A chat model that writes token by token. It costs about $0.03 a ticket and a second or more, so it sees only what the cascade sends up, and it writes the reply the customer reads.

Step 6 · Fresh state

The model knows only what you send

So far every ticket was clean. But the model knows nothing about your business except what is on the sheet. Was this card charged twice? depends on this customer’s orders, and a customer’s whole history is a heap of text, most of it irrelevant. What goes on the sheet?

Ticket“my card was charged twice”Question Sheettyped boxes, not textFresh Statefacts fetched in code
New in this step: Fresh State.

What should accompany the ticket on the sheet?

  1. Fetch the order, then ask. A small relevant sheet beats a large noisy one.

  2. Irrelevant text is noise, and accuracy falls as the sheet fills with it.

  3. It has no world knowledge and no memory of your customers. It reads what you give it, literally.

Fresh State: your code fetches the order first, then asks. Send what the question needs and nothing more, ask in the customer’s own words, and count in code then hand it the number: it is not a calculator.

Why this piece earns its place

Three properties of the model decide this step. It reads literally, so the words you ask in should be the words the customer used. It has no world knowledge, so any fact about this customer must be on the sheet. And it suffers from context rot: pour in a long history and accuracy falls, because the relevant lines are buried in irrelevant ones. Public documentation sets the request budget at 64K tokens and a text-only input, which is large, but a limit is not a target. So the right design has code do what code is good at, fetching this order and counting the orders, and the model do only the judgment. The cost is a lookup you write and maintain, and a second place where a bug can hide.

  • 64Ktoken request budget
  • 1order fetched, not a history
  • 0arithmetic done by the model

What the new pieces do

Fresh Statestate
The model knows only what you send. Code fetches this customer’s order first and sends a small relevant sheet, not the whole history, and does any counting itself.

Step 7 · The audit

The hidden slot: a confident number on changed traffic

Six of six parts are built and it has run for a month. Month two: the dashboard is green and the confidence still says 90%. But a new product launched, with new words, new complaints and some in another language, and the number is right 70 times in 100. Nothing errored. What is the slot you only find after running it?

Question SheetHonest NumberThresholdDecision ModelCascadeWriting ModelFresh StateActionWeekly Audit
New in this step: Weekly Audit. · swipe to pan the diagram

The dashboard is green and the number says 90%. What do you check?

  1. Calibration was measured on the traffic it was measured on. New traffic can quietly break it.

  2. Label 200 tickets, plot said against true, and move the bar if 90 has become 70, before money moves.

  3. Latency measures speed. A confident wrong answer is exactly as fast as a confident right one.

The Audit: every week a person labels 200 tickets and plots what it said against what was true. If 90 has become 70, move the bar. Pin the model version so a release cannot shift the numbers, and treat the ticket as untrusted: a customer can write “urgent, refund yes”.

Why this piece earns its place

The failure here is not a wrong answer; it is a confident one, and that is why nothing flags it. The number does not know the traffic changed, so it keeps saying what it learned to say. Calibration is a measurement on your own traffic, never a promise, so you re-measure: label a few hundred cases a week, compare, and adjust the bar before the money moves. Two guards go with it. Pin the model version, because a new release can shift the numbers under a threshold you tuned. And treat the state as untrusted, because the sheet keeps the shape of the answer but cannot keep the truth, so anything that moves money needs a second check in code. The price is a person’s hour, every week.

  • 200labelled tickets a week
  • 90 → 70said vs right
  • 1pinned model version

What the new pieces do

Weekly Auditaudit
The hidden seventh slot. Calibration is a measurement on your own traffic, not a promise. Label 200 tickets a week, compare what the number said with what was true, and move the bar before money moves.

The payoff

You designed a decision layer

From “ask a chat model for a word” to a rack of seven: a typed question sheet, one pass, an honest number, a threshold priced by the cost of being wrong, a cascade so only hard cases are expensive, fresh state fetched in code, and the audit, because traffic changes.

TicketQuestion SheetHonest NumberThresholdDecision ModelCascadeWriting ModelFresh StateActionWeekly Audit
The finished design, end to end. · swipe to pan the diagram

Now trust a number that always says 95%, set the refund bar by feel, then skip the audit. Those three are the whole trade-off: decide fast with a model that says how sure it is, write only when you must, and every part has a price.

Everything you assembled, in order

  • Question sheet — typed boxes: a choice, a score, a yes or no
  • One pass — every box at once: 1.2 s → 0.1 s, $30,000 → $400
  • Honest number — of 100 called 90%, about 90 right; squared penalty
  • Threshold — refund above 1 − 2/50 = 96%; review below
  • Cascade — one in ten climbs: $3,400, almost 9× cheaper
  • Fresh state — fetch in code; small, relevant, in the customer’s words
  • Audit — 200 labelled tickets a week; pin the version
  • The numbers — 12× faster · 75× cheaper · 96% bar · 70 in 100 caught

Deep cut · 12:03

My card was charged twice.

The interactive build above lays out a decision layer around a model that never writes: a typed question sheet, a single pass that fills every box at once, an honest probability for each answer, a threshold priced by the cost of a mistake, a cascade that sends only the hard cases to a writing model, fresh state fetched in code, and a weekly audit. The film builds the same rack at a triage desk, one slot at a time, following a single ticket, “my card was charged twice”, and then finds the hidden seventh slot: what happens to a confident number a month later. It is the public design plus first principles, not anyone’s internals.

  • See the envelope: 60 tokens at 20 ms is 1.2 seconds against 0.1 seconds for one pass, 12 times faster. A million tickets at $0.03 is $30,000 a day against $400, 75 times cheaper. With one ticket in ten climbing to a writing model, the bill is $3,400.
  • Take it into the interview: a probability is only worth a bar if it is calibrated, the bar comes from the cost of a mistake (1 − 2/50 = 96%), and calibration is a weekly measurement on your own labelled traffic, because the number does not know when the traffic changed.

Where an interviewer pokes next

Getting the boxes right is the easy half. These are the questions that separate a candidate who drew the diagram from one who has run the thing. Answer each one out loud before you open it.

  1. Why is a typed question sheet better than asking the chat model for a word?

    Because a model that can only fill a typed box cannot return four spellings of one answer, so your code reads exactly one field of the type it declared. It removes the parser and the retry. The cost is that you must know your questions in advance, and it can still pick the wrong box.

  2. Why can a decision model answer ten questions for about the price of one?

    Because it has no sentence to write. A writing model picks a token and feeds it back, so sixty tokens is sixty sequential trips. A decision model fills every box in the same pass, so a tenth question barely slows it. The trade is that you get values and probabilities, not written reasoning.

  3. What does it mean for a probability to be calibrated, and how is it trained?

    Of 100 answers called 90%, about 90 are right. It is trained with a penalty on the squared gap between what was claimed and what happened, so with a truth of nine in ten, claiming 90% loses 0.09 on average and claiming 99% loses 0.0981. Boasting costs more than honesty.

  4. How do you set the confidence bar for approving a refund?

    From the cost of a mistake. A wrong refund costs $50 and a review costs $2, so break even is 1 − 2/50 = 96%. Above it, approve; below it, a person looks. At 90% sure a mistake costs about $5 on average, at 99% about 50 cents. The bar comes from the cost, not from a feeling.

  5. The dashboard is green and the number says 90%. Why still audit?

    Because calibration is a measurement on your own traffic, not a promise. A new product can make 90% right only 70 times in 100 with nothing erroring. Label 200 tickets a week, compare said with true, move the bar before money moves, and pin the model version so a release cannot shift the numbers.

Check yourself — the answers, and why

Eight steps in, these are the calls you should be able to make cold. Pick one, then read why.

  1. A writing model needs 60 tokens at 20 ms each; a decision model answers in one pass of 0.1 s. How much faster is the single pass?

    60 × 20 ms = 1.2 s against 0.1 s is 12×. The 75× figure is the cost ratio: $30,000 against $400 a day.

  2. Of 100 answers a calibrated model called “90%”, how many should be right?

    That is the whole definition of calibrated. A model that says 95% and lands 72 is overconfident.

  3. A wrong refund costs $50 and a human review costs $2. Above what confidence should a refund be approved automatically?

    Break even is 1 − 2/50 = 96%. At 90% a mistake costs about $5 on average, more than the review.

  4. Which is true of the squared penalty when the truth is nine in ten?

    Honesty wins: 0.9 × 0.01 + 0.1 × 0.81 = 0.09, against 0.9 × 0.0001 + 0.1 × 0.9801 = 0.0981.

  5. With one ticket in ten climbing to a writing model, what does the cascade cost per day for a million tickets?

    $400 for the decision model on all of them, plus 100,000 × $0.03 = $3,000 for the hard tenth: $3,400, almost 9× cheaper than $30,000.

  6. Month two: the number still says 90% but is right 70 times in 100. What was missing?

    Calibration is measured on your own traffic. A recurring audit of 200 labelled tickets catches drift before money moves.

Go deeper: the films this design leans on

A decision layer touches several systems that have their own films. Each one takes a part this page mentions and builds it from the ground up.

  1. 1. Why every token costs a full pass: the inference serverInference server · 35:06
  2. 2. How people review the uncertain cases at scale: content moderationContent moderation · 24:38
  3. 3. How to fetch the right facts before the question: the RAG pipelineRAG pipeline · 12:19
  4. 4. How to measure a number against real traffic: evals and observabilityEvals and observability · 19:07
  5. 5. What a writing model does at the top of the cascade: the AI agentAI agent · 25:41

How you’d open this design in an interview

Before any boxes: agree what it must do, pin the qualities that shape everything, then build — naming each trade-off as you make it. The walkthrough above is that exact order.

What it must do

Agree on these before drawing a single box.

  • Decide: read a messy message and choose from options you define.
  • Be quick: answer every question in one pass.
  • Be honest: say how sure it is, and be right that often.
  • Act: turn a number into an action by what a mistake costs.
  • Escalate: hand the hard cases to something slower, or to a person.
  • Stay clean: work from the facts of this ticket and nothing else.

The qualities that shape everything

Each one names the mechanism that buys it.

A million tickets a day
A decision is made over and over, so cost and latency are per-ticket numbers multiplied by a very large one (illustrative).
A decision fits inside a live flow
60 tokens × 20 ms = 1.2 s to write an answer, against 0.1 s for a single pass: 12× faster.
A bill that survives volume
1,000,000 × $0.03 = $30,000 a day, against 1,000,000 × $0.0004 = $400: 75× cheaper.
A number you can set a bar on
Of 100 answers called 90%, about 90 are right. That is what calibrated means, and a squared penalty trains it.
Automate only what is cheap to get wrong
A wrong refund costs $50 and a review $2, so approve above 1 − 2/50 = 96% and send the rest to a person.
Notice drift before money moves
Label 200 tickets every week and compare what the number said with what was true.

The trade-offs you say out loud

Senior signal isn’t the boxes — it’s naming what you gave up and why it was the right price.

Fix the question sheet over asking for free text

The output is always the type your code expects. The cost is that you must know your questions in advance.

Answer in one pass over writing token by token

Ten questions cost about what one costs. The price is no written reasoning to read afterwards.

Train for honest numbers over trusting a confident-sounding one

You get a confidence you can set a bar on, but it is only as honest as the traffic it was measured on.

Set thresholds by cost over setting them by feel

You automate exactly what is cheap to get wrong. Someone must put a price on every mistake.

Run a cascade over sending everything to the writing model

The expensive model only sees the hard cases. It is one more thing to run and watch.

Fetch state in code over stuffing the whole history in

A small relevant sheet gives a sharper answer. You write and maintain the lookup.

Audit calibration over trusting the dashboard

You notice drift before money moves. It costs a person’s hour, every week.

The answer, out loud

What a strong answer to “Design Jev” sounds like, first question to last trade-off. It is about 5 minutes of talking; the whiteboard and the interviewer fill the rest of the 45. Read it aloud once, then close the page and give it yourself.

  1. 0–2 min

    Put the number on the board

    Before I draw anything I want one number. Say a million tickets a day, and a writing model that produces about sixty tokens per answer at twenty milliseconds a token. That is one point two seconds and about three cents a ticket, thirty thousand dollars a day, to choose one word. A decision model answers in a single pass, a tenth of a second and about four hundred dollars. Twelve times faster, seventy-five times cheaper. These figures are illustrative, and I am designing from public documentation and first principles, not from anyone’s internals. But notice that fast and cheap are the easy half. The hard half is a number the code can act on, so I would spend the rest of the interview there.

  2. 2–4 min

    A typed sheet, answered in one pass

    I would not ask for text at all. I hand the model a sheet of typed questions: a choice among options I define, a score on a scale, a yes or no with a probability. It can only fill boxes, so it cannot drift into four spellings of one answer, and my code reads exactly one field. Because there is no sentence to write, every box fills in the same trip, so ten questions cost about what one costs. That means I should ask everything I might need at once. The cost I would own is that I must know my questions in advance, and I get no written reasoning back.

    Built in step 1: Hand over questions, not a prompt
  3. 4–6 min

    An honest number, and a bar from the cost

    A probability only helps if it is calibrated: of a hundred answers called ninety percent, about ninety are right. You train that by paying for honesty, with a penalty that is the gap between what was said and what happened, squared. Say ninety and be right costs a hundredth, say ninety and be wrong costs eighty-one hundredths. If the truth is nine in ten, claiming ninety loses nine hundredths on average and claiming ninety-nine loses a little under ten, so boasting does not pay. Then the bar: a wrong refund costs fifty dollars and a review costs two, so I approve above one minus two over fifty, ninety-six percent, and send the rest to a person. The bar comes from the cost, not from a feeling.

    Built in step 3: What does “90%” have to mean?
  4. 6–7 min

    Cascade and fresh state

    Now I put it in front of everything. The decision model sees every ticket, and only the hard ones climb to a writing model. If one in ten is hard, that is a hundred thousand tickets at three cents, three thousand dollars, plus four hundred, thirty-four hundred against thirty thousand, almost nine times cheaper. The confidence is the router: a low number is the signal to climb. And the model knows nothing about the business except what I send, so my code fetches the order first, sends only what the question needs, asks in the customer’s words, and counts in code, because it is not a calculator.

    Built in step 5: Cheap first, a writer only for the hard ones
  5. 7–8 min

    The seventh slot: the audit

    Here is the part I would raise myself. Month two, the dashboard is green and the number still says ninety, but a new product launched and it is right seventy times in a hundred. Confident and wrong, with no error anywhere. Calibration is a measurement on my traffic, not a promise, so every week a person labels two hundred tickets and I compare what it said with what was true, and move the bar before money moves. I pin the model version so a release cannot shift the numbers under me, and I treat the ticket as untrusted, because a customer can write urgent, refund yes. The trade: every part has a price, and I would rather name the prices than pretend it is free.

    Built in step 7: The hidden slot: a confident number on changed traffic

What this teaches

Learn AI system design by designing a decision layer around a model like Jev, a model that does not write. An interactive guide covering why 60 tokens at 20 ms is 1.2 seconds and $30,000 a day against one pass at 0.1 seconds and $400, the typed question sheet, the single pass that fills every box at once, the calibrated probability and the squared penalty that trains it, the threshold that comes from the cost of a mistake (96% for a $50 refund), the cascade that cuts a $30,000 bill to $3,400, fresh state fetched in code, and the weekly audit that catches a confident answer on traffic that has changed.

Key takeaways

  • Question sheet — typed boxes: a choice, a score, a yes or no
  • One pass — every box at once: 1.2 s → 0.1 s, $30,000 → $400
  • Honest number — of 100 called 90%, about 90 right; squared penalty
  • Threshold — refund above 1 − 2/50 = 96%; review below
  • Cascade — one in ten climbs: $3,400, almost 9× cheaper
  • Fresh state — fetch in code; small, relevant, in the customer’s words
  • Audit — 200 labelled tickets a week; pin the version
  • The numbers — 12× faster · 75× cheaper · 96% bar · 70 in 100 caught

Concepts covered

  • "Design a decision layer" — why is this even hard?
  • Hand over questions, not a prompt
  • Every box, one trip through the model
  • What does “90%” have to mean?
  • The bar comes from the cost of a mistake
  • Cheap first, a writer only for the hard ones
  • The model knows only what you send
  • The hidden slot: a confident number on changed traffic
built to be reasoned about, not memorized — typed questions, one pass, an honest number, a bar set by cost, and an audit because traffic changes.
Finished this one? 0 / 65 AI System Designs done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More AI System Designs