Page 1 of 8~128 min topic

Capstone: ship a tiny AI app

Frame the grounded café FAQ application experiment

Ship a falsifiable slice of **grounded café FAQ app with validation, five-note retrieval, citations, tests, demo** — success is gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout, not a polished screenshot.

~16 min this pageExperiment brief

1Try it yourself

Playground

Capstone: ship a tiny AI app

Pick a project template, then check off each shipping step. Progress saves in this browser.

FAQ bot · Tiny classifier · Tool agent — labels below will match your pick.

2Learn the idea

Read

Name the operable slice

This lab builds grounded café FAQ app with validation, five-note retrieval, citations, tests, demo. The human in the loop is café ops lead answering hours/wifi/pets questions from a kiosk. Scope is intentionally narrower than “make AI reliable”: you will prove one oracle — gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout — and one invariant — unsupported questions abstain; every answer cites a note id; two-minute clean-room demo. Record non-goals in your notes so a later change cannot silently expand authority. The incident mnemonic for the chapter is CAP-CAFE-DEMO-01; design as if that ticket is already written and you are filling evidence.

Read

Write the acceptance contract

Turn the oracle into a table: input fixture, expected observable, prohibited side effect, owner, latency/cost ceiling. Separate model taste from software correctness — transport, auth, parsing, and termination must be deterministic even when generated text varies. Primary metric family: gold_pass and demo_seconds. Averages without a denominator or revision label do not gate release. Fake external dependencies in unit tests; live calls wait until fakes pass.

Read

Implementation artifact

NOTES = {"hours": "Open 8–18 weekdays", "wifi": "Ask staff for the card", "pets": "Service animals welcome"}

Read

Freeze the first red test

Before implementation, encode a failing check that would have caught demo relies on personal .env and unreproducible notebook state. That failure is the pedagogical north star for later pages: contracts reject it, happy path never performs it, validation asserts it, failure-handling contains it, observability detects it, security-ops prevents privilege tricks around it, and mastery replays it in a drill. Endpoint under study: CLI faq_ask.

Read

Stage depth

Capacity note for planners: estimate peak demand on CLI faq_ask and the cost ceiling for a failed retry storm. Write the abort conditions — unbounded spend, cross-tenant leakage, or inability to roll back — before you enjoy the first green test. Prefer synthetic fixtures shaped like production over anonymized production dumps you cannot share in class. When you are tempted to widen scope, re-read the oracle (gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout) and cut features that do not serve it. The teaching outcome is judgment under constraints: café ops lead answering hours/wifi/pets questions from a kiosk gets a trustworthy control, not a kitchen-sink framework. Keep the language of release decisions: promote, hold, or roll back — never “see if it gets better.”

Read

Field notes for `capstone-ship-it` / `lab-goal`

Decide what will live in version control on day one: fixtures, contract markdown, and a failing test name. Write the cost ceiling as a hard number with currency and period. If the lab involves clusters, name the non-prod context you will use and forbid prod kubecontexts in scripts. Capture the baseline metric once before changing code so later gains are comparative. Refuse tools that hide the request path behind magic macros until the oracle is green on fakes. In this chapter the product is grounded café FAQ app with validation, five-note retrieval, citations, tests, demo, the human stakeholder is café ops lead answering hours/wifi/pets questions from a kiosk, and the incident id you design against is CAP-CAFE-DEMO-01. Re-state the oracle in your notes — gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout — and keep the invariant visible: unsupported questions abstain; every answer cites a note id; two-minute clean-room demo. Track gold_pass and demo_seconds as the scoreboard. Surface under change control: CLI faq_ask.

Go deeper

Before you start

Why this matters

Write the single done-definition a reviewer would accept for Capstone: ship a tiny AI app (CAP-CAFE-DEMO-01). Include the numeric gate hidden in this oracle: gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout. Then name the fake success you refuse: a demo that ignores demo relies on personal .env and unreproducible notebook state. Keep the sentence beside your editor; every later page should make this sentence easier to prove.

Across this capstone you will evolve one product narrative — grounded café FAQ app with validation, five-note retrieval, citations, tests, demo — rather than eight disconnected exercises.

In the wild

See how this idea shows up as a product and a company — then come back to the lesson. Skills transfer across vendors.

Check your understanding

Page assessment

Answer from memory. Completion is saved from this evidence, not from opening the next page.

1. Is the oracle (gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout) falsifiable from a fixture?
2. Is the invariant (unsupported questions abstain; every answer cites a note id; two-minute clean-room demo) stated without hand-waving?
3. Does the contract name CAP-CAFE-DEMO-01 as a risk you design against?

All responses are required.