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

The Harness (everything around the loop that the model never touches)

The Harness
The Harness · Open board

Building with LLMs. The board that steps back from The Loop (an agent is a while loop around one model call)‘s twenty lines and draws the two thousand wrapped around them: one turn of the returns desk traced through every box it passes, the latency each box costs, the four things the model is never handed, and five named ways a turn breaks. The claim in its subtitle is the whole lesson: this part is a normal service, and it deserves to be built like one.

Before you start. The Loop (an agent is a while loop around one model call) built the twenty lines that assemble a window, call the model, run the tool it asks for, and check the answer, call that the loop, and remember its window is just the messages sent so far. This lesson is everything a company builds around that loop before it lets it talk to a paying customer.

Lesson 47 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

  • 2022: a customer’s grandmother dies, and a chatbot writes a promise no one signed
  • What Air Canada was missing
  • One message, and everywhere it goes before an answer comes back
  • The tool that only answers for the person asking
  • The return that needs a real yes, not a sentence that looks like one
  • Rebuilding the conversation, without a screenshot
  • A normal service, built like one
  • Where the five seconds went
  • When the model’s servers say “busy”
  • When the kettle’s return is sent twice
  • The two things the story never showed
  • A help page that tries to give orders
  • Which instructions wrote this answer?
  • A day of traces, and a day of bills
  • All of it in code

Terms it explains: harness, gateway, session, transcript, scope, confirmed, trace, Retrieval, Persist, turn, 5,380, first byte, fallback tier, iteration, idempotency key, budget object, prompt injection, prompt registry, canary, prefix cache, cost meter, hit rate.

Related paper

Review AI