Capstone: support bot with RAG + tools
Run acceptance tests and make the ship call
A second person can reproduce order lookup returns status+policy cite; cross-customer order_id → deny+escalate from a clean checkout and name the owner for CAP-SUPPORT-TOOL-09.
1Try it yourself
Playground
Support bot: RAG + tool
Retrieve policy text, optionally fetch live order status, then answer with citations.
User: Can I refund order #8821 on my annual plan?
- → Retrieve FAQ chunk
- ○ Call order lookup tool
- ○ Generate cited reply
2Learn the idea
Read
Clean-room demo
From a fresh clone/directory, run the commands that prove order lookup returns status+policy cite; cross-customer order_id → deny+escalate. A second person plays customer asking where order A12 is without leaking other customers' orders and follows your script without coaching. The demo includes limitations: what support API: versioned policy retrieval + scoped order tool + cited answer or escalate still will not do.
Read
Evidence pack
Bundle: contract snippet, passing tests, metric snapshot for unauthorized_tool_calls == 0 and citation_rate ≥ 0.9, security negative probe, rollback note, owner name. Reference CAP-SUPPORT-TOOL-09 as the drill you rehearsed. If any item is missing, the ship gate fails even if the happy path dazzles.
Read
Implementation artifact
npm test -- support.capstone.test.ts
Read
Ownership and next review
For Capstone: support bot with RAG + tools, name the human who gets paged, the review date for thresholds, and the condition that triggers reevaluation. Endpoint POST /v1/support/turn remains the production surface you operate for support API: versioned policy retrieval + scoped order tool + cited answer or escalate — not a slide. Keep CAP-SUPPORT-TOOL-09 in the handoff template so the next owner inherits the drill.
Read
Stage depth
After the peer demo, schedule the next threshold review date. File a short changelog that mentions CAP-SUPPORT-TOOL-09 and the control that addresses it. Archive the evidence pack where your team already stores launch records. Resist rewriting everything “for real production” in one weekend — operate this slice until the metrics bore you, then widen. Final self-check: if telemetry vanished, would you still know to hold? If yes, you learned the operating posture this lane teaches.
Read
Field notes for `capstone-support-bot` / `mastery-ship`
Trim the demo script until every command is necessary. Record a peer signature line: name, date UTC, pass/fail. File known limitations as bullets, not apologies. Link the evidence pack from the README. Schedule the next game day on a calendar, even if it is solo. Archive the branch tag or release digest you actually shipped. In this chapter the product is support API: versioned policy retrieval + scoped order tool + cited answer or escalate, the human stakeholder is customer asking where order A12 is without leaking other customers' orders, and the incident id you design against is CAP-SUPPORT-TOOL-09. Re-state the oracle in your notes — order lookup returns status+policy cite; cross-customer order_id → deny+escalate — and keep the invariant visible: tool args bind to session customer_id; refunds never auto-executed. Track unauthorized_tool_calls == 0 and citation_rate ≥ 0.9 as the scoreboard. Surface under change control: POST /v1/support/turn. If you only have forty minutes, finish the fixture for model passes attacker order_id and tool executes 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
Draft a two-minute demo script that proves order lookup returns status+policy cite; cross-customer order_id → deny+escalate from a clean directory. Include the failure rehearsal for model passes attacker order_id and tool executes and the rollback/owner line. If the script needs tribal knowledge, the lab is not shipped.
The capstone ends when a peer runs support API: versioned policy retrieval + scoped order tool + cited answer or escalate clean and signs the evidence pack.
Related lessons
Check your understanding
Page assessment
Answer from memory. Completion is saved from this evidence, not from opening the next page.
All responses are required.