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 02 · AI · From a model to an app · about 16 min to read

Play it as a journeyTutor comes with a plan

Capstone: Anatomy of an LLM App

Capstone Anatomy of an LLM App
Capstone Anatomy of an LLM App · Open board

“Capstone: Anatomy of an LLM App”, the finale of the How LLMs Work track. One customer’s message travels the whole stack, and every board in the track turns out to be one hop on that journey.

Before you start. You need the returns desk from Agents & Tool Use, where the clerk who can only talk is the large language model itself, the printed forms are its tools (ordinary functions in your code, like lookup_order, described to the model so it can ask for one by name), and the back office that fills a form in is your code running that function. You also need one fact from Inference (sampling, context, KV cache, hallucination): the model remembers nothing between sentences, so somebody has to copy the whole conversation out again every single time.

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

  • 9:04 on a Tuesday: nine hops between a message and a label
  • The prompt: the page your code writes before the model reads a word
  • Why the prompt is rebuilt every turn: the model remembers nothing
  • Where the 6.9 seconds went: writing is slow, and streaming hides most of it
  • Guardrails: the two checks that do not trust the model
  • Nine hops: which of them are the model, and which are your code
  • Ten lessons, one shop: every board in the track is one hop
  • Hop by hop: where the 6.9 seconds went
  • The bill: the page is sent three times
  • Which lever does the owner pull first?
  • The day the desk fills up
  • Twenty forms instead of two
  • All of it in code

Terms it explains: How LLMs Work, large language model, prompt, 8,000, context window, 270, 2,650, 120 ms, 39 ms, 1,170 ms, 1,290 ms, 80 ms, 3,900 ms, 4,030 ms, streaming, 3.0 s, 1.4 s, guardrails, 20 ms, 6,610 ms, 285 ms, 7%, 45%, 8%.

Review AI