Page 3 of 8~120 min topic

Deploy a RAG app

Build the first working /ask with health routes

One clean transaction through **GET /readyz** must match the oracle: kubectl rollout status shows ready; /readyz 200 only when index pin matches.

~15 min this pageImplementation

1Learn the idea

Read

Order the successful transaction

Code the narrow path that serves platform engineer shipping faq-index@sha256:a1b2 to staging: accept → authorize/normalize → call dependency → validate → record. Keep stages named so a trace can show which boundary passed. Success must emit evidence useful to ready_ratio == 1 and citation_miss_rate ≤ 0.02 during rollout, not only a 200 with prose. Predict the observable for GET /readyz before running: kubectl rollout status shows ready; /readyz 200 only when index pin matches.

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 containerized café FAQ RAG with readiness probes and versioned index pin — resist adding unrelated features mid-path.

Read

Implementation artifact

docker build -t faq-rag:2026-07-30 .
kubectl set image deploy/faq-rag api=faq-rag:2026-07-30
kubectl rollout status deploy/faq-rag --timeout=120s

Read

Compare prediction to result

For Deploy a RAG app, paste the CLI/HTTP transcript beside your prediction for GET /readyz. If the oracle is unmet (kubectl rollout status shows ready; /readyz 200 only when index pin matches), 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 DEPLOY-EMPTY-INDEX-5.

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 ready_ratio == 1 and citation_miss_rate ≤ 0.02 during rollout. 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 platform engineer shipping faq-index@sha256:a1b2 to staging experiences wall-clock time, not your debugger’s single-step comfort.

Read

Field notes for `deploy-rag-app` / `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 containerized café FAQ RAG with readiness probes and versioned index pin, the human stakeholder is platform engineer shipping faq-index@sha256:a1b2 to staging, and the incident id you design against is DEPLOY-EMPTY-INDEX-5. Re-state the oracle in your notes — kubectl rollout status shows ready; /readyz 200 only when index pin matches — and keep the invariant visible: readyz fails if index digest ≠ pinned digest; rollback restores previous digest in < 2 min. Track ready_ratio == 1 and citation_miss_rate ≤ 0.02 during rollout as the scoreboard. Surface under change control: GET /readyz. If you only have forty minutes, finish the fixture for new pods serve empty index while old pods terminate — citation miss spike 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 platform engineer shipping faq-index@sha256:a1b2 to staging. Circle the first irreversible side effect. Your prediction should mention GET /readyz and the evidence field that proves kubectl rollout status shows ready; /readyz 200 only when index pin matches.

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 ready_ratio == 1 and citation_miss_rate ≤ 0.02 during rollout?
3. Did you compare prediction vs transcript?

All responses are required.