<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bakri Bitar</title>
    <description>The latest articles on DEV Community by Bakri Bitar (@bakribitar).</description>
    <link>https://dev.to/bakribitar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4040335%2F6080147e-cefa-4144-a2ae-7ab1f9046be2.png</url>
      <title>DEV Community: Bakri Bitar</title>
      <link>https://dev.to/bakribitar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bakribitar"/>
    <language>en</language>
    <item>
      <title>How We Built an AI Support Chatbot for WhatsApp That Never Hallucinates</title>
      <dc:creator>Bakri Bitar</dc:creator>
      <pubDate>Tue, 21 Jul 2026 15:12:43 +0000</pubDate>
      <link>https://dev.to/bakribitar/how-we-built-an-ai-support-chatbot-for-whatsapp-that-never-hallucinates-4347</link>
      <guid>https://dev.to/bakribitar/how-we-built-an-ai-support-chatbot-for-whatsapp-that-never-hallucinates-4347</guid>
      <description>&lt;p&gt;Every "AI customer support" demo looks great until a real customer asks something the model doesn't know — and it confidently makes up an answer anyway. On WhatsApp, where a business's reputation lives in a single chat thread, that's not a bug you can shrug off. It's the whole product failing.&lt;/p&gt;

&lt;p&gt;That problem is why we built &lt;a href="https://revoplyai.com" rel="noopener noreferrer"&gt;RevoplyAI&lt;/a&gt;, and I want to walk through the actual constraints we designed around, not just the pitch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The constraint: answer only from what the business gave you
&lt;/h2&gt;

&lt;p&gt;Most "AI chatbot" tools are a thin wrapper around a general-purpose LLM. Ask it something outside its training data and it doesn't say "I don't know" — it pattern-matches to something plausible-sounding and ships it straight to a paying customer.&lt;/p&gt;

&lt;p&gt;We took the opposite approach: the assistant is scoped to a retrieval layer built from the business's own knowledge base — PDFs, Word docs, website URLs, YouTube transcripts, FAQs — and it is instructed to answer &lt;em&gt;only&lt;/em&gt; from that retrieved context. No matching context, no confident-sounding guess. It either escalates to a human or says it doesn't have that information. That single constraint changes almost every downstream design decision: chunking strategy, retrieval thresholds, prompt structure, and the handoff logic when confidence is low.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why WhatsApp specifically is a harder integration than it looks
&lt;/h2&gt;

&lt;p&gt;If you've never built on it: WhatsApp doesn't let you just spin up a bot with your own number and start sending template-free messages at scale. To do this safely and at scale you need to go through the official WhatsApp Business API as a verified Meta Tech Provider — which is the path we built on, instead of the unofficial browser-automation approach a lot of "WhatsApp bot" tools quietly rely on (and which gets numbers banned).&lt;/p&gt;

&lt;p&gt;That decision meant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Session-window rules (24-hour customer service windows vs. template messages)&lt;/li&gt;
&lt;li&gt;Rate limits and quality-rating mechanics that Meta enforces per phone number&lt;/li&gt;
&lt;li&gt;A "number warm-up" flow, because a business number that suddenly blasts high volume looks like spam to Meta's systems, even if every message is a legitimate reply&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of that is glamorous, but it's the difference between a demo and something a business can run production traffic through without getting their number flagged.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture, briefly
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ingestion&lt;/strong&gt;: business docs/links get parsed and chunked into a knowledge base per workspace&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval&lt;/strong&gt;: incoming message → embed → retrieve relevant chunks → confidence check&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generation&lt;/strong&gt;: LLM answers strictly from retrieved context, in the customer's language (Arabic dialects and English are first-class, not an afterthought — this was one of the harder NLP problems, since a lot of models handle formal Arabic fine but fall apart on dialectal WhatsApp-style text)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Escalation&lt;/strong&gt;: low confidence or explicit request → handoff to a human agent in a shared team inbox, with full conversation context carried over&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Channels&lt;/strong&gt;: same knowledge base and logic power WhatsApp, Telegram, and a website widget, so a business trains once and deploys everywhere&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What this actually gets a business
&lt;/h2&gt;

&lt;p&gt;Setup is under 15 minutes with no code, which mattered to us because most of our users are small teams, not engineering orgs. In practice this replaces a big chunk of repetitive first-line support (roughly 80% of inbound volume in our data) while keeping a human in the loop for anything nuanced, at a fraction of the cost of scaling a support team linearly with message volume.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;There's a free plan (no credit card) if you want to see how it handles your own docs: &lt;a href="https://revoplyai.com/ar?utm_source=devto" rel="noopener noreferrer"&gt;revoplyai.com&lt;/a&gt;. Happy to answer questions in the comments about the retrieval setup, the WhatsApp API integration, or anything else — this is very much a "here's what we learned building it" post, not a sales pitch.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>whatsapp</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
