Tutorials · Chapter D (4/4) · ~14 min
Capstone: support bot with RAG + tools
Try it → see it → read → next
Ship a support-shaped loop — retrieve policy, call a lookup tool, answer with citations.
Try 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
Recap
What you just did
You walked retrieve → tool → grounded reply for a refund question tied to a real order.
Teach
How it works
Minimal architecture:
- FAQ / policy chunks in a vector index
- Tool for live data (order status, account tier)
- Prompt that cites retrieved text and tool JSON
- Guardrails — refuse if no policy match; escalate humans on anger/fraud flags
user → retrieve(policy) → tool(lookup_order) → LLM → cited answer
Use it
When you'd use this
- Portfolio project beyond "hello world" chat
- Internal prototype before Zendesk/Intercom integration
Watch out
Watch out
Tools need auth. Never expose admin APIs. Log PII carefully.
Try next
Try this next
Cheatsheet: RAG quality · Lesson: function calling in code