← All case studies

Website AI Chatbot

The assistant in the bottom-right corner of this page. It answers questions about the studio, helps visitors describe what they need, and hands a clean summary to the contact form — grounded in a curated knowledge base instead of model guesswork.

AI product · Conversation design · Full-stack TypeScript · Vercel Functions · OpenRouter
Status
Live here
Models
Light + main
Facts from
Curated knowledge
Hand-off
Fills the form

The challenge

Website chat can feel clever in demos and unhelpful in practice. The brief was simple: handle real visitor questions with clarity, stay on-brand, never invent prices or promises, and know when to hand over to a human instead of improvising.

How it works

Instead of one monolithic prompt, every message goes through a short pipeline. Cheap, fast steps decide what to do; the larger model is only used to write the answer.

  1. 1 · ClassifyLight model

    Is this a question, a project inquiry, small talk, off-topic or an injection attempt?

  2. 2 · PlanRules

    Pick a mode: answer from knowledge, ask one follow-up, redirect, or wrap up.

  3. 3 · AnswerMain model

    Write the reply using only the curated knowledge base and recent memory.

  4. 4 · Hand offLead recap

    Extract the details and prefill the contact form with one click.

What’s inside

  • Intent routing separates service questions, project discovery, lead capture and off-topic chat.
  • Memory with a budget: long conversations are folded into a short summary so context stays useful without growing the token bill.
  • Grounding: answers come from a human-editable knowledge file; anything not in it gets an honest “we don’t have that here”.
  • Guard rails: no invented pricing or deadlines, resistance to prompt injection, and a polite exit for persistent off-topic use.
  • Abuse protection: origin checks plus per-visitor and daily rate limits backed by a shared store, so traffic spikes can’t run up the model bill.
  • Multi-model routing through OpenRouter, so each step uses the cheapest model that does it well.

The outcome

A practical first touchpoint: faster answers for visitors, fewer repetitive emails, and better-quality inquiries arriving through the form. Because each layer is separate, we can tune classification, memory and prompts independently — the same architecture we build for clients who want an assistant on their own site.