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 04 · AI · The string and the contract · about 21 min to read

Play it as a journeyTutor comes with a plan

Structured Output and Tool Schemas (the contract between model and code)

Structured Output and Tool Schemas
Structured Output and Tool Schemas · Open board

Building with LLMs. The board after “Context Engineering” (Context Engineering (what goes in the window, and who decides)) decided what goes into the string the model reads. This one decides what happens to the string the model writes back.

Before you start. A model writes one token at a time, a token being a word or a piece of one, the unit it writes in. Everything it has read so far: instructions, conversation, and now a description of what it may ask for, sits in front of it as one long stretch of text, the prompt. This lesson follows what happens to the text it hands back.

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

  • October 2022: a model that asks, in a sentence
  • What broke: prose does not hold still
  • June 2023: a form, not a sentence
  • The returns desk: a slip, and someone who reads it
  • Two different repairs, and only one can be guaranteed
  • Where the forms sit, and what they cost
  • How the form is written down
  • Which way of asking actually works
  • Four checks before the clerk acts
  • How many forms fit on the counter
  • All of it in code

Terms it explains: schema, harness, parsing, parse failure, validation, mask, grammar, idempotent.

Related paper

Review AI