Loading...
✦Case study · AI & automation✦

Website AI Chatbot Case Study: Ranbanka Sales Assistant

We built our own AI sales assistant for ranbanka.com: verified answers in English, Hindi or Hinglish, replies in seconds, a hard $2/day spend cap and leads sent only with consent.

Ranbanka Systems (our own in-house AI system)

This website AI chatbot case study is about a product we built for ourselves. The "Chat with us" assistant on every page of ranbanka.com answers visitor questions from our verified company data, suggests the right pages to read, and captures enquiries straight into our team inbox, but only after the visitor confirms. It was built in-house by the Ranbanka team, and it shows the kind of system we can build for clients through our AI solutions work.

The challenge

Visitors reach ranbanka.com from India, the US and the UK, and many of them arrive outside our office hours. They want to know what services we offer, how we approach eDetailers, and what we have delivered before. For a lot of people, filling in a contact form is a big first step to take just to get a simple question answered.

We wanted visitors to get instant answers. But a website chatbot that speaks for a company carries real risks, so the assistant had to meet four goals:

  • Always true. Every answer had to come from our verified company data, with no risk of invented claims.
  • No runaway cost. AI usage had to be capped so that spend could never grow out of control.
  • Consent first. Leads could only be captured with the visitor's consent.
  • Safe. The assistant could not become a tool for sending email to third parties.

The hardest part was meeting all of these at once: truthful, cheap and safe at the same time.

What we built

The assistant is a chat widget that sits on every page of the site, backed by a small, tightly controlled AI service.

Answers only from verified data

The assistant answers only from a knowledge snapshot built from the site's own data: services, portfolio, testimonials, company stats, blog articles and case studies. These are the same facts our blog fact-checker uses, so the chat and the published content draw on one source of truth. It may only state facts from that snapshot, it does not quote prices or timelines, and it links only to real pages.

Helpful next steps

With each answer, the assistant can suggest up to three links to the right page, article or case study, so a visitor asking about past work can go straight to our portfolio or the relevant offering on our services page.

Lead capture with consent

When a visitor wants to get in touch, the assistant collects their name, email and need. Nothing is sent until the visitor confirms. Once confirmed, the lead is emailed to our team inbox, and every lead is then passed to our AI lead triage.

Three languages

The assistant replies in English, Hindi or Hinglish, so visitors can ask in the language they are comfortable with.

How we delivered it

One controlled graph per message

Each message runs through a LangGraph graph with a fixed sequence of steps: validate → check_limits → respond → submit_lead (only when the visitor confirms). The respond step is the only Claude call, and it runs once per message. Keeping the model to a single, well-defined step makes behaviour predictable and cost easy to reason about.

Hard limits on cost and abuse

Usage limits are checked in the check_limits step, before the respond step calls the model:

  • A hard $2 per day total spend cap. Once it is reached, the widget points visitors to the contact form instead.
  • 60 messages per visitor per day, tracked by hashed IP.
  • 3 leads per visitor per day.
  • 15 turns per conversation.
  • 800 characters per message.

The limits are stored in Amazon DynamoDB with TTL. The design is fail-safe: if usage cannot be read, the chat refuses rather than spend.

Safe by design

Leads are only ever emailed, via Amazon SES, to our own inbox, never to an address a visitor typed. That means the assistant cannot be abused to send email to third parties. The backend runs as Python 3.12 on AWS Lambda (arm64) behind a Function URL restricted to our own domains.

Stateless and fast

The server is stateless: the browser keeps the conversation in sessionStorage. The chat widget is built in Next.js/React (we cover when that stack makes sense in Next.js website development: when it's the right choice). Opening the widget sends a warm-up request, so the first answer takes about 4 seconds instead of 12-18 seconds after a cold start.

Tested offline and live

The assistant is covered by an offline test suite that uses a fake LLM, fake DynamoDB and fake SES, so the logic, limits and lead flow can be tested without spending money or sending real email. It is also checked with a live evaluation.

The result

The assistant is live on every page of ranbanka.com. What we measured:

  • About 4 seconds for the first answer, thanks to the warm-up request when the widget opens (instead of 12-18 seconds after a cold start).
  • About $0.004 per message once the prompt cache is warm, and about $0.02 for the first message after a few idle minutes.
  • A hard $2/day spend cap, which covers roughly 400-500 messages a day.
  • Leads sent only after the visitor confirms, always to our own inbox, then passed to AI lead triage.
  • Answers grounded in verified data, in English, Hindi or Hinglish, with links only to real pages.

For us, the value is as much in the engineering as in the chat itself: a public-facing AI feature with a fixed cost ceiling, a single source of truth, and safety rules enforced in code rather than left to the model.

Want an assistant like this on your site?

If you need a website chatbot that stays truthful to your own data, respects a strict budget and captures leads only with consent, we can build it for you. See more of our AI work on AI solutions, or contact us to book a free initial consultation.

At a glance
Client
Ranbanka Systems (our own in-house AI system)
Industry
AI & automation
Services
AI-Enabled Applications, Web Development, API Development
Platforms
Claude Sonnet 5.5, LangGraph, Python 3.12 on AWS Lambda, Amazon DynamoDB, Amazon SES, Next.js/React
Languages
English, Hindi, Hinglish
Result
Replies in seconds · Hard $2/day spend cap · Leads sent only after the visitor confirms
Contact Us

Have a project in mind?

Tell us what you're building — our team will get back to you with next steps.

  • Free initial consultation
  • Response within 24 hours
  • NDA & confidentiality
Contact Us →