July 13, 2026

What We’ve Learned of Building Our WhatsApp Support Agent ?

Written by:
Godwin Houdji

Introduction

🔗


With the current rise of RAG and LLMs, it has become increasingly possible to convert WhatsApp into a support agent. While creating a basic demo may appear relatively simple, constructing a robust, production-level support agent is considerably more difficult. It requires careful optimization, continuous tuning, and overcoming real-world challenges. One important concept in doing this, is "chunking": breaking down information into smaller, well-structured pieces that the agent can process efficiently to provide accurate answers.

When we set out to build a highly reliable WhatsApp support agent, it wasn't long before we realized that chunking wasn't just another detail in the technical schema, but the very backbone on which everything stood. How information is chunked and formatted can vastly affect response quality, especially for complex documents such as PDFs, where proper layout and alignment are crucial.

Through testing and iteration, we determined the critical components necessary to make chunking work. These formed the bedrock for developing a support agent that is both reliable and accurate; we felt these learnings could be helpful for anyone working on RAG-based applications.

Why Building a WhatsApp Agent ?

🔗


In October 2024, Kabakoo Academies faced a new operational challenge regarding the deployment of two new learning cohorts: Digital Makers and Regenerative Architecture and Extended Reality. Each cohort had three tracks, resulting in a total of six programs that required targeted recruitment, information sharing, and candidate enrollment.

The magnitude of this assignment was considerable.

  • More than 5,000 applications were received.
  • Many questions were raised about course content, recruitment drives, and payment plans.
  • There was a need for 24-hour support facilities to cope with the high volume of inquiries.

Understanding how resource-intensive it would be to manually manage these processes, we sought recourse in artificial intelligence. Our intent in adopting the WhatsApp support agent powered by an AI system was to better manage our time, resources, and response times.

Performance also improved:

  • Within the first three days of launch, our agent on WhatsApp responded to about 1,600 queries daily.
  • The AI-based system provided seamless support, which was essential to ensuring every query received a response.
  • It handled application forms, payment methods, and inquiries about available courses.

With the implementation of the WhatsApp agent, we greatly improved our capacity to execute mass recruitment and information dissemination, providing timely and accurate support to thousands of prospective learners.

How We Built the AI WhatsApp Support Agent

🔗


Building this AI-powered WhatsApp support agent was a collaborative effort that combined data processing, machine learning, and conversational AI techniques. Here's a step-by-step look at how we approached it:

  1. Document Handling and Chunking

    First, we started by processing all the informational resources, such as PDFs, into manageable chunks of text. This involved reading PDF files, cleaning the content (removing unnecessary whitespace or formatting issues), and organizing it into smaller, digestible sections. This step wasneeds to process information in manageable sizes for retrieval and context generation. Weprefer chunk by page, ie, each page is considered to be a chunk.

  2. Embedding and Indexing

    To enable the agent to understand and retrieve relevant chunks of information, wels. Each text chunk was transformed into a vector representation, which allows the agentto determine the similarity between a user query and the document content.

    We then indexed these embeddings using FAISS, a fast and efficient library for similarity search. This indexhelps us quickly locate the most relevant chunks when a user asks a question.

  3. Question Understanding and Context Retrieval

    When a user sends a query, we use a two-step approach:

    • Rephrasing the Question: To ensure clarity and compatibilityagent reformulates the user's input. This is particularly useful when queries are vague or informal. Exemple: A user asks, "What is the schedule for program X?" After receiving the response, they follow up with, "And for Y?" The system needs to understand that the user is now asking for the schedule of program Y. Through reies the intent, making it easier to retrieve the relevant chunk of information in the next step.
    • Finding Relevant Chunks: The agent embeds the rephrased ques document for the most relevant chunks. By considering adjacent chunks (before and afterthe top match), we provide more comprehensive context.
  4. Crafting the Final Response

    Armed with the relevant context, the AI crafts a personalized and detailed response for the user. To make interactions seamless and engaging.

Result

🔗


Our WhatsApp support agent has made a big difference, and we've shared some of its success in our monthly newsletter, which you can read here 👉🏿 Kabakoo : Monthly update 11/2024.

The agent processed around 15,000 queries in a month, which mean more than 30,000 interactions between the users and the support system. Those were from about 3,700 unique users, proving just how powerful the solution has been at scaling our ability to manage communication and provide timely assistance.

Figure 1: Daily Unique Applicants vs Message

Our Key Learnings While Building Our Support Agent

🔗


Creating a support agent with LLMs taught us a lot, and these lessons can help anyone working on something similar. Here's what stood out:

  1. Chunking Is the Secret Sauce

    Think of chunking as breaking a big puzzle into manageable pieces. It's not just a technical step, it's the foundation for making your support agent reliable. Each chunk needs to feel complete and easy to understand on its own. Include key elements like headers, footers, and tables to maintain context. Maintaining the integrity of paragraphs is particularly important, as this simple step can significantly reduce the likelihood of errors or ambiguous answers.

  2. Give Your Agent the Full Picture

    For your agent to offer helpful answers, it needs to see the bigger picture. Instead of using isolated chunks of information, it is valuable to design a chunking strategy that considers how sections of a document relate to one another. For instance, include nearby chunks when fetching content so the agent can "connect the dots" and deliver a response that makes sense.

    We saw this in action when handling a request for the list of modules in a cohort. Our system uses page-based chunking, meaning each chunk corresponds to a page. In this case, the relevant section about the cohort's modules (Figure 2) was spread across two different pages. To provide a complete answer, retrieving just one chunk wasn't enough — we also needed to fetch the previous or next page to capture all the necessary details. This approach ensures the agent delivers a response that includes the full list of modules rather than an incomplete or misleading answer.

    WhatsApp conversation
    Figure 1: Screenshot of a conversation illustrating the agent's full understanding
    Modules list
    Figure 2: Overview of the detailed list of modules across two pages
  3. Tackle Tricky Document Layouts Head-On

    Not all documents are created equal. Some have two columns, complex tables, or funky layouts that make extracting information tricky. It is important to develop chunking rules tailored to handle these specific formats while maintaining the natural flow of the content. When done right, this ensures that the agent won't get tripped up by the structure and can deliver accurate, easy-to-follow answers to users.

  4. Keep Improving, It's a Journey

    Building a support agent is not a one-and-done deal. As document formats, user queries, or data evolve, so too must the chunking strategy. During our experience, we observed, for instance, that retrieving only the most relevant chunk was sometimes insufficient for answering complex queries. To improve response quality, we expanded our retrieval approach to include the top two most relevant chunks, along with preceding or following ones when applicable. This provided better contextual understanding, especially for multi-page documents.

    Additionally, we optimized embedding generation by implementing asynchronous processing, making API calls to OpenAI embeddings more efficient. This reduced latency and indexing time, ensuring faster responses. To further enhance efficiency, we integrated FAISS indexing and pickle-based caching, allowing us to store and quickly reload precomputed embeddings instead of recalculating them each time.

    These refinements — expanding chunk retrieval, improving embedding generation, and optimizing storage — led to more accurate, faster, and context-aware responses, ensuring the support agent remains effective as content and user needs evolve.

    Regular monitoring and analysis are essential to identify areas for improvement and address recurring issues. This ongoing cycle of optimization ensures the support agent remains reliable, adaptive, and responsive to ever-changing demands.

By integrating these practices, teams can develop more accurate, resilient, and user-friendly support agents, transforming WhatsApp into a powerful, context-aware service channel.


Tools We Used

🔗


To bring the WhatsApp support agent to life, we leveraged a combination of tools working cohesively:

  • WATI: WATI served as the interface for receiving and sending messages on WhatsApp. It acts like a gateway between the users and the support agent, ensuring smooth communication.
  • n8n: We used n8n as our automation system. It was connected to WATI and served as the key orchestrator of our workflow by triggering API calls to our Python backend and routing the responses back to the user.
  • Python: The core logic including document processing, generating embeddings, and fetching relevant chunks of information in order to answer user queries, was powered by Python.


Conclusion

🔗


Building a robust WhatsApp support agent with AI is a journey of continued learning and improvement. We learned from experience how essential it is to really focus on thoughtful chunking, maintenance of context, and being flexible as documents and user needs evolve. While there’s no one-size-fits-all solution, these insights can help guide anyone working with LLMs to create more effective and efficient support systems. Our successful agent proves how AI can scale communication and deliver impactful results. We can't wait to continue to get better, and we hope others on the road will take the lessons learned.