Page 3 of 8~128 min topic

Capstone: ship a tiny AI app

Build the first working grounded café FAQ application

One clean transaction through **CLI faq_ask** must match the oracle: gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout.

~16 min this pageImplementation

1Learn the idea

Read

Order the successful transaction

Code the narrow path that serves café ops lead answering hours/wifi/pets questions from a kiosk: accept → authorize/normalize → call dependency → validate → record. Keep stages named so a trace can show which boundary passed. Success must emit evidence useful to gold_pass and demo_seconds, not only a 200 with prose. Predict the observable for CLI faq_ask before running: gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout.

Read

Run with fakes first

Drive the path with recording fakes or local stubs. Assert call order and arguments. Idempotency keys or stable ids should keep retries from duplicating costly work where the product requires it. Product under test remains grounded café FAQ app with validation, five-note retrieval, citations, tests, demo — resist adding unrelated features mid-path.

Read

Implementation artifact

assert ask("When do you open?")["citation"] == "hours"

Read

Compare prediction to result

For Capstone: ship a tiny AI app, paste the CLI/HTTP transcript beside your prediction for CLI faq_ask. If the oracle is unmet (gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout), stop and debug this page; do not compensate with prompt folktales. Re-run once after a clean process start to catch hidden global state that would invalidate CAP-CAFE-DEMO-01.

Read

Stage depth

Performance sketch: measure local p95 for the fake-backed path so later regressions are obvious. Keep concurrency modest until failure-handling proves limits. Log a single structured event per success with request id, revision, and the evidence field behind gold_pass and demo_seconds. Avoid hidden global caches in the happy path unless the lab is about caching — and even then key by tenant. If the path calls a model, pin model id in config and echo it in the response for auditability. Remember café ops lead answering hours/wifi/pets questions from a kiosk experiences wall-clock time, not your debugger’s single-step comfort.

Read

Field notes for `capstone-ship-it` / `happy-path`

Prefer explicit function names over a single god-object handleRequest. Thread a correlation id from ingress to the last log line. When streaming, define what partial failure means before coding. Snapshot one successful response body in fixtures after redaction. If the path writes to a queue, assert message attributes in the fake. Stop adding retries on this page; that is the next concern. 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. If you only have forty minutes, finish the fixture for demo relies on personal .env and unreproducible notebook state before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.

Go deeper

Before you start

Why this matters

Without calling production, order the steps a single success takes for café ops lead answering hours/wifi/pets questions from a kiosk. Circle the first irreversible side effect. Your prediction should mention CLI faq_ask and the evidence field that proves gold 5/5 cited + 3/3 abstain; demo under 120s from clean checkout.

This happy path is the spine of the capstone demo for café ops lead answering hours/wifi/pets questions from a kiosk.

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 call order asserted, not assumed?
2. Does success evidence support gold_pass and demo_seconds?
3. Did you compare prediction vs transcript?

All responses are required.