AI Concierge Layer for a Large WhatsApp Chatbot Platform
Quality, Cost and New Capabilities at Millions of Users
My Role
- LLM-simulated users with 8 personas test bots
- Langfuse tracing on every LLM call
- Model per task: GPT-4o-mini or Claude
Approach at a Glance
Details- 1LLM Autotest Framework
- 2Observability and Quality Gates
- 3Model Choice per Task
- 4Throughput and Cost
- 5Voice Replies
- 6Knowledge for Businesses without Documents
- 7Richer Information Collection
Executive Summary
The AI layer of one of Brazil's large WhatsApp chatbot platforms. Businesses upload their documents, define FAQ scopes and the information to collect, then share the bot as their AI concierge with their own customers. That adds up to tens of thousands of bots, millions of active users and several million messages a day, mostly in Portuguese.
I joined in August 2025 as Head of AI, architect and tech lead, with a team of three engineers, QA, a PM and DevOps, and led the AI work until April 2026. At this scale, my focus was on three things:
- Quality you can measure: I built an LLM autotest framework in which simulated users with eight personalities test bots end to end. I also introduced tracing of every LLM call, a dedicated test environment and strict quality gates.
- Cost and throughput: model choice per task, per-tenant LLM keys, batched translation and background processing.
- New capabilities: voice replies, FAQ generation for businesses without documents, a separate PDF-extraction service and new information-collection flows.
On questions covered by the businesses' indexed knowledge, answers were about 0.97 accurate.
Client Profile
The client is a Brazilian platform where companies, creators and professionals build automated WhatsApp conversations without code. Its AI layer turns those bots into assistants that understand free text, answer from each business's own content and collect structured information, for example to schedule, track or change a delivery.
When I joined, the AI layer was already in production. The challenges were the ones that come with scale:
- Quality you can't check by hand: tens of thousands of bots, each with its own knowledge and flows, and every prompt change can affect all of them.
- Cost per message: several million messages a day make every model call a cost decision.
- Unequal businesses: many businesses have no documents to upload, but still need a useful bot.
- Real users: people write informally, change topics, get impatient or confused, and mix formats.
Technical Approach
-
LLM Autotest Framework – I designed and built an end-to-end testing framework in which an LLM plays the end user and talks to a bot through its real chat API:
- 8 personalities: normal, rude, calm, confused, chatty, professional, anxious and technical, because real users are not polite test scripts.
- Three modes: knowledge questions generated from golden FAQ data, information-collection scenarios such as scheduling, tracking, modifying or cancelling a delivery, and mixed conversations.
- Checking the state: the bot's stored state in Redis and PostgreSQL is compared with the expected values, with an LLM judge for fuzzy matching across languages, abbreviations, dates and units.
- Reports: answer accuracy by language and source, information-collection accuracy, the rate of fully correct conversations, and matched, mismatched or missing values.
-
Observability and Quality Gates – I introduced Langfuse tracing of every LLM call and a separate test environment with a sample-data exporter for the database and the Qdrant vector store, so tests run on realistic data. Pipelines got stricter quality gates: tests on every commit, coverage reporting and code analysis without exclusions. Prompt issues found by QA and the autotests, in message classification, information collection and translation, were fixed in a tight loop.
-
Model Choice per Task – Different agents use different models, GPT-4o-mini or Claude, depending on what each task needs. With per-tenant LLM keys, businesses' usage can be routed and accounted for separately.
-
Throughput and Cost – FAQ translation runs as batched asynchronous tasks, and FAQ summarisation moved to background processing during sync, so they don't slow live conversations. A shared HTTP session per service and leaner Kafka messages, with no request bodies in logged events, keep the pipeline within message-size limits under load.
-
Voice Replies – Bots can answer with voice: a media downloader and text-to-speech with ElevenLabs.
-
Knowledge for Businesses without Documents – FAQ and questionnaire generation works without uploaded documents, so smaller businesses also get a useful knowledge base. Document text comes from a separate PDF-extraction service with retries.
-
Richer Information Collection – A new paraphrase variable type, an LLM flow that turns a user's free-form answer into the value the business needs, extends what bots can collect in a conversation.
Business Outcome
The platform's AI layer became measurable and cheaper to run at millions of users: every LLM call is traced, bot quality is checked automatically by simulated users before changes reach customers, and heavy work runs in the background or in batches. On questions covered by the businesses' knowledge, answers were about 0.97 accurate. Bots gained voice replies, businesses without documents got a working knowledge base, and information collection became more flexible.
Technologies
Planning something similar?
Tell me about it on a short call. New projects can start within 2 weeks