Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 05 · AI · The loop and its harness · about 23 min to read

Play it as a journeyTutor comes with a plan

Guardrails, Cost and Latency (the three budgets the harness enforces)

Guardrails Cost and Latency
Guardrails Cost and Latency · Open board

Building with LLMs. The last board of the run. “Evals for Apps” (Evals for Apps (the test suite for a program that is a string)) built the instrument that says whether a reply is right. This board asks the three questions that come after right: what the app may do, what it may spend, and how long it may take.

The returns desk is a support assistant built on a large language model (LLM), software trained to read and write text: that helps an online shop’s customers look up an order and start a return.

Before you start. Every reply from the returns desk starts from the window, the block of text the model reads before it answers, and its only action besides replying is a tool call: asking a program to run one exact, named action, like looking up an order. The harness is the ordinary code wrapped around the model that holds the window together and cannot be seen or argued with by the model, every check in this lesson lives there, never in a sentence of the prompt.

Lesson 55 of 83 in AI

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 14 February 2024: a chatbot’s reply becomes an $812 bill
  • The three lines the returns desk’s engineers refused to leave to the model
  • Turn three: a hidden line inside a help page
  • The till: a mistake at a million turns a day
  • The clock: the turn the unluckiest customer gets
  • One object, and the ruling that never happens
  • Three doors, and what slips through them
  • Why the help page got nowhere
  • What a day costs
  • How long the unluckiest customer waits
  • All of it in code

Terms it explains: guardrail, allowlist, rung, least privilege, lethal trifecta, budget, escalate, tokens, $1,638, $80, 95%, $756, $180, $311, 13.5 s.

Related papers

Review AI