← backCoding & DashboardsFounding · Free forever

Build an AI chatbot for your site

Turn on prompt caching from day 1 — it cuts costs 60%+ on repeat system prompts.

by @whitney · recommended tool Claude Code · 0 unlocks

0

You'll need

CLAUDE SKILLS

claude-api

CONNECTORS

Webflow

EXAMPLES · WHAT THIS PROMPT PRODUCES

Sample output
**Built: grounded support chatbot for docs.meridianpay.com**

Stack: Claude Sonnet 4.6 via the Anthropic API, embedded as a floating widget. Grounding data: the Meridian Pay help center (84 articles) chunked and retrieved per query.

**System prompt (excerpt):**
"You are Meridian Pay's support assistant. Answer only from the provided documentation context. If the answer isn't in the docs, say so and offer to connect a human. Always cite the article title you used. Never invent fees, limits, or policy."

**Features delivered:**
- **Conversation history** — full thread passed back each turn so follow-ups stay in context.
- **Source citations** — every answer ends with a linked "Source: [article]" so users can verify.
- **Escalate-to-human** — a "Talk to a person" button and an automatic handoff when the model can't ground an answer; opens a ticket with the transcript attached.

**Cost + safety config:**
- **Prompt caching ON** — the system prompt and the retrieved doc context are marked with `cache_control`, cutting input token cost ~62% on repeat queries within the 5-minute window.
- **Rate limiting** — 20 messages/visitor/hour via a sliding-window counter keyed on session ID, returning a friendly cooldown message on overflow.
- Input length cap and an output token ceiling to prevent runaway responses.

Included: `widget.js`, the serverless API route, and a `.env.example` with `ANTHROPIC_API_KEY`.
PRICE HISTORY0 cr · current

PROMPT TEMPLATE · v1.0.0

Build an AI chatbot embedded on <SITE>.
Grounding data: <DOCS/SITE_CONTENT>. Model: Claude Sonnet 4.6 via Anthropic API.
Features: conversation history, source citations, escalate-to-human handoff.
Include: system prompt, cache config, rate limiting.

RESULTS · WHAT PEOPLE GOT

0
Sign in to show colleagues what this case produced.
No results posted yet. Used this case? Show colleagues what it produced.

DISCUSSION

0 comments
Sign in to join the conversation.
No comments yet — be the first.

MORE LIKE THIS