Dev.to AI ๐Ÿค– Ai ๐Ÿ‘ 0 ๐Ÿ“– 2 min read

What we learned building an AI receptionist on WhatsApp that is not allowed to touch the database

We build Chatbot Minds, an AI receptionist that answers customers on WhatsApp and books their appointments. Its first users are clinics, which means two things: the data is sensitive, and a wrong booking is a real person

We build Chatbot Minds, an AI receptionist that answers customers on WhatsApp and books their appointments. Its first users are clinics, which means two things: the data is sensitive, and a wrong booking is a real person standing at a closed door. Here are the design rules that came out of that, in case you are building something similar.

1. The model never touches the database

The LLM can only call a short list of tools. Every call goes through one gateway: the arguments are checked against a schema, then a permission policy decides whether the action runs on its own, waits for a human's approval, or is refused, and only then does ordinary application code do the work.

The model never sends an account id, a customer id or a raw date and time. Free slots are handed to it as opaque signed tokens made by the server, so it can pick a slot but cannot invent one.

2. Treat every customer message as untrusted input

Prompt injection is not a theory when anyone can message your number. So safety never depends on the model refusing; it depends on the model being unable. If a tool doesn't exist, no clever message can call it.

3. Code first, model second

Confirmations, cancellations, opt-outs, button replies and reminders are handled by plain code. The model is only used to understand free text. That makes the common paths instant, cheap and predictable, and leaves the model for what it is actually good at.

4. Emergencies are caught before the model

A clinic's assistant must never give medical advice. Messages that look like an emergency are detected by code before the model sees them, the customer is pointed to emergency services, and the team is alerted.

5. The webhook does almost nothing

WhatsApp webhooks are verified against the signature on the raw body, de-duplicated by message id, queued, and answered within about 100 ms. The web request never waits on the LLM.

6. Time zones with daylight saving are a trap

Store times in UTC and convert per date through the tz database. A fixed offset will move appointments by an hour twice a year.

7. Encrypt what identifies people

Names, phone numbers and message bodies are encrypted at rest. Lookups use a keyed hash column, and none of them ever reaches a log.

None of this is exotic, but together it lets a small team run an assistant that books real appointments without hoping the model behaves. If you want to see it working, Chatbot Minds is at chatbotminds.com.

๐Ÿ“ฐ Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.