Training the AI on your business
A practical guide to turning MsgHub's AI from a generic chatbot into your business's knowledgeable customer service agent. Upload your real content, tune the voice, test it, then let it answer 80%+ of routine enquiries while your team handles the rest.
Overview
Out of the box, the AI inside MsgHub is a generic language model — it can hold a conversation but knows nothing about your business. Training is the process of giving it your knowledge base: product catalogues, FAQs, pricing, policies, hours. After training, when a customer asks "Do you ship to Pune?", the bot answers from your real shipping policy instead of hallucinating.
The AI in MsgHub has three moving parts you configure:
- Knowledge Base — a top-level sidebar page where you store articles and Q&A entries that the bot retrieves from.
- Chatbot Flows — visual flow builder (also top-level sidebar) where AI Reply and KB Lookup nodes use the knowledge base to answer messages.
- AI Provider — a section inside Settings where you bring your own API key for Anthropic / OpenAI / Gemini / OpenRouter. MsgHub doesn't ship a hosted LLM; you supply the model credits.
This guide covers five parts:
- Plan what content to load.
- Add entries to the Knowledge Base (articles + Q&A pairs).
- Configure AI Provider — pick a model and paste your API key.
- Wire it into a Chatbot Flow — drop AI Reply or KB Lookup nodes into the flow.
- Improve based on real conversations over the next few weeks.
How training actually works (under the hood)
Many "AI training" guides skip this and just point at buttons. Knowing the mental model makes everything else easier.
MsgHub uses Retrieval-Augmented Generation (RAG). Three phases:
- Chunking & embedding — when you upload a document, MsgHub splits it into small chunks (~300 words each) and converts each chunk into a vector embedding. Stored in your tenant's private vector index.
- Retrieval — when a customer asks a question, MsgHub embeds the question, finds the 4–6 most similar chunks from your knowledge base, and passes them to the language model as context.
- Generation — the model answers using only those retrieved chunks, not from generic background knowledge. If nothing relevant is found, it falls back rather than hallucinating.
Takeaway: answer quality depends on whether the right chunk is retrievable. The model is the easy part — your knowledge base structure is the lever. The rest of this guide is mostly about making content that retrieves well.
Prerequisites
- An active MsgHub tenant account with at least one channel connected — see WhatsApp Setup or Instagram Setup.
- Source-of-truth content — gather what you already have:
- Product catalogue (any format: PDF, CSV, screenshots, your website)
- Existing FAQ document, even if hand-written in Word
- Shipping / delivery / service-area policy
- Return, refund, warranty terms
- Pricing or rate sheet
- Business hours, holiday schedule
- About 45 minutes for the first pass. Refinement happens later as you watch real conversations.
Part 1 · Plan your knowledge base
The single biggest mistake new users make: dumping every PDF in the company into the bot on day one. The bot then answers worse, not better, because retrieval surfaces irrelevant chunks. Be selective.
The 80/20 rule
Most businesses can cover 80% of customer questions with these five documents:
- Product list with prices — what you sell, at what price, in what quantity, with what variants.
- FAQ doc with 10–20 entries — your most common customer questions, in plain Q&A format.
- Shipping & delivery policy — areas served, lead time, charges, free-shipping thresholds.
- Return / refund / warranty terms.
- Business profile — what you do, where you're located, hours, contact, who to escalate to.
What to leave out (for now)
- Long marketing brochures or pitch decks — too much fluff, low signal-per-chunk.
- Anything that changes weekly (live stock, current promotions). Add these later as short Q&A pairs you can update fast.
- Internal SOPs, HR policy, financial documents. Customers won't ask, and the wrong chunk could surface.
Part 2 · Add Knowledge Base entries
The Knowledge Base is a top-level sidebar item — sidebar → Knowledge Base. Each entry is either an article (title + body) or a Q&A pair (question + answer). The bot retrieves from both kinds when answering customer messages.
Create an article
Articles are best for longer, structured content — your shipping policy, return terms, a product catalogue page.
- Sidebar → Knowledge Base.
- Click + New Article.
- Fill the fields:
- Title — a descriptive title like "Shipping & delivery policy — India".
- Content — the full body. Plain text or HTML.
- Category (optional, free-text) — helps debugging later when the bot retrieves the wrong entry.
- Status — Draft (not retrievable) or Published (live for the bot to use).
- Click Save.
Or add a Q&A pair
Q&A pairs are best for the questions customers ask most. Direct retrieval, no chunking needed.
- Same Knowledge Base page → + New Article.
- Instead of filling Title + Content, fill the Question and Answer fields at the bottom of the form.
- Write the question the way customers actually phrase it ("how much for 5l disinfectant?" — not "What is the MRP of the 5-litre SKU?").
- Write a short, complete answer with the key fact + a CTA.
- Status: Published. Save.
Q: "what's your shipping cost to Mumbai?"
A: "We ship to Mumbai in 1–2 business days. Free above ₹500, otherwise flat ₹60. Cash on delivery available. Need an order placed? I can take details."
Q: "Shipping policy details"
A: "Please refer to our shipping policy on the website for complete details."
Bulk-import Q&A pairs from CSV
For 50+ Q&A pairs from an existing FAQ doc, use the bulk importer.
- Knowledge Base page → Import Q&A button (next to + New Article).
- Supported formats:
.csvand.txt. - CSV columns:
question, answer, category(category optional).
No PDF/DOCX upload, no URL crawl currently. If you have content in PDF or on your website, convert it to article body text or a CSV of Q&A pairs first. Catalogue / FAQ imports from Shopify/WooCommerce are available via the Integrations page — they create Q&A entries for each product.
Part 3 · Configure your AI Provider (BYOK)
MsgHub doesn't bundle an LLM — you bring your own provider API key. This keeps the platform cost flat and gives you full control over model choice.
Pick a provider and model
- Click Settings at the bottom of the sidebar.
- Scroll to the AI Provider section (subtitle: "Used by AI Reply and AI Classify nodes in chatbot flows").
- Pick a provider tab: Anthropic (Claude), OpenAI (ChatGPT), Google Gemini, or OpenRouter.
- Pick a model from the dropdown. Anthropic offers Claude Haiku 4.5 / Sonnet 4.6 / Opus 4.6. OpenAI offers GPT-4o-mini / GPT-4o. Gemini offers 2.0 Flash / 2.5 Flash. OpenRouter offers 12+ models including Qwen 3.5 397B, Llama 4 Maverick, GLM 5.1.
- Paste your API Key from the provider's dashboard.
- Click Save.
(Optional) Split models for cost optimisation
Tick "Use different API per feature (save cost)" to split into two independent tiers:
- Agent AI — drives Agent Chat. Needs tool-calling support. Use a stronger model (Claude Sonnet 4.6, GPT-4o, or Qwen 3.5 397B on OpenRouter).
- General AI — used by Copilot, Ghost Agent, Smart Router, Translation, WA Bot Mode. Use a cheaper/faster model (Claude Haiku 4.5, GPT-4o-mini, or a free OpenRouter model).
This typically cuts your AI bill by 40–70% with no perceived quality difference on routine tasks.
Part 4 · Wire AI into a Chatbot Flow
The Knowledge Base + AI Provider don't do anything on their own. To actually answer customers, you wire them into a Chatbot Flow using one of two node types: KB Lookup or AI Reply.
Open a chatbot flow
- Sidebar → Chatbot Flows.
- Click + New Flow or open an existing one.
- You're now in the visual Flow Canvas (drag/drop nodes, connect with edges).
Add an AI node — pick the right type
Two AI nodes are available in the node palette:
Configure the node:
- For KB Lookup: pick the query variable (usually the customer's last message), set a result variable name, and write a fallback text for when nothing matches.
- For AI Reply: pick a model, set Use Knowledge Base = yes for RAG, set max tokens, write a fallback text, set a confidence threshold (below it, the fallback fires).
Activate the flow
- Save the flow.
- Toggle the Active switch on the flow's edit page.
- The flow is now live — incoming messages on the channel(s) you've connected it to will trigger it.
To preview the flow's behaviour before activating: in the flow canvas, walk through each node manually. There's no separate "AI playground" — testing happens in the flow editor itself or by sending a real test message to the connected channel.
Part 5 · Hand off to humans when needed
Add an Assign Agent node in your flow at the right escape points:
- After an AI Reply node fires its fallback (confidence too low).
- On a Condition node matching phrases like "speak to human" or "manager".
- On specific intents (e.g. refund request, complaint) that should always go to a person.
The conversation moves to the Inbox sidebar item with a notification for available agents.
For more sophisticated routing (skills-based, language-based, tenure-based) use a Smart Routing node — see the AI section of the sidebar.
Part 6 · Improve over time
The first version of your bot will be 70% right. The next version, after one week of real traffic, can be 90%+ if you build a habit of weekly review.
Weekly review (15 minutes)
- Sidebar → Inbox — scan recent AI-handled conversations, especially ones that ended with a fallback or an agent handoff.
- Read 5–10 of them. For each:
- Was the customer's question reasonable?
- Was the right answer in your Knowledge Base?
- For any "reasonable question, answer was missing" — add a Q&A entry in Knowledge Base. 30 seconds each.
- For any "reasonable question, wrong answer" — find the offending entry in Knowledge Base, fix or delete it.
- If the bot is mis-classifying customer intent, head to sidebar → Intent Training and add corrections (Add correction form).
Compounding effect: by week 4, your bot is answering 90%+ of routine enquiries and your team's workload on repetitive questions is down 5–10×. Most teams report this within the first month of disciplined review.
Ten best practices
- Start small. 5 articles and 10 Q&A pairs beat 200 entries on day one.
- Use the customer's words, not your internal jargon, when writing Q&A pairs.
- One topic per article. Long articles mixing shipping + returns + warranty retrieve worse than three focused entries.
- Q&A pairs beat articles for high-frequency, short-answer questions.
- Update prices in the relevant Q&A / article entries when they change — there's no auto-sync from external sources.
- Use the Draft status while you're writing — entries only become retrievable when set to Published.
- Always wire an Assign Agent fallback in your flow — never trap a customer with a bot that can't help.
- Test with real questions by sending messages to the connected channel, not the questions you wish customers would ask.
- Review weekly for the first 4 weeks. Then monthly is fine.
- Track resolution rate: % of conversations the bot finished without handoff. Aim for 60% → 80% over 2 months.
Troubleshooting common issues
Bot answers with wrong prices
- An older Knowledge Base entry still has the old price. Search the KB list and update or delete.
- Two entries with conflicting prices exist. The bot may retrieve either. Consolidate.
- Two products with similar names confuse retrieval. Rename one or add a disambiguator ("5L Disinfectant — bulk SKU" vs "5L Disinfectant — retail SKU").
Bot refuses easy questions ("I don't have that info")
- The info isn't in the KB — verify in sidebar → Knowledge Base by searching.
- It's there but the customer's phrasing doesn't match the article body. Add a Q&A pair using the customer's exact words.
- Article is in Draft status. Change to Published.
- Confidence threshold on the AI Reply node is too high — lower it in the flow.
Bot gets the right answer but tone is wrong
- The AI Provider model is too curt or too verbose. Try a different model (e.g. Claude Haiku for short / Claude Sonnet for nuanced).
- Add explicit tone instructions in the AI Reply node's system prompt: "always reply in 2–3 sentences", "use Hindi loanwords occasionally", etc.
Bot replies in the wrong language
- Model isn't strong on Indian languages. Switch to Claude Sonnet 4.6 or Qwen 3.5 397B for better multilingual handling.
- Add a system instruction to the AI Reply node: "Always reply in the same language the customer used."
AI Reply node returns an error
- Your AI Provider API key is missing or invalid. Settings → AI Provider → re-paste the key.
- Your provider account is out of credits / hit a monthly cap. Top up at the provider's dashboard.
- The model picked doesn't support tool calling but the node needs it (Agent-class). Switch to a tool-calling-capable model.
Frequently asked questions
How much content do I need to add to get started?
A useful bot can be running in 30 minutes with three things: a product article with prices, ~10 Q&A pairs covering your top customer questions, and a shipping / service-area article. Start there and grow. Bots loaded with 200+ entries on day one usually perform worse than ones with 15 well-curated entries.
What content formats can MsgHub ingest?
Two ways to add knowledge: write articles (title + body, plain text or HTML) directly in the Knowledge Base page, or bulk-import Q&A pairs from CSV/TXT. PDF, DOCX, and URL crawl are not currently supported — convert to article body or CSV first.
Do I need an AI provider account?
Yes. MsgHub is BYOK (bring your own key). Sign up for Anthropic, OpenAI, Google Gemini, or OpenRouter, paste the API key in Settings → AI Provider. MsgHub doesn't bundle LLM credits — you pay your provider directly. This keeps the MsgHub platform cost flat and gives you full control over model spend.
Does my data get used to train someone else's AI?
Your Knowledge Base and customer conversations live in your tenant only — not used to train shared models on MsgHub's side. Note that when an AI Reply node calls your AI provider (Anthropic / OpenAI / etc.), the customer message + retrieved context is sent to that provider. Each provider has its own data-handling policy — check theirs if regulated data is in scope.
Can the AI answer in Hindi, Gujarati, Marathi?
Depends on the model you pick. Claude Sonnet 4.6, Qwen 3.5 397B, and GPT-4o all handle Indian languages well — natively and in Roman script. Smaller models (Haiku, GPT-4o-mini, Gemini Flash) sometimes lose nuance. If multilingual quality matters, pick a frontier model.
What's the difference between KB Lookup and AI Reply nodes?
KB Lookup searches your Knowledge Base and returns the closest match — no LLM call, cheaper, deterministic. AI Reply sends the customer message + retrieved KB context to your AI provider for a contextual generated reply. Use KB Lookup for known FAQs, AI Reply for open-ended reasoning.
How do I prevent the AI from hallucinating?
In the AI Reply node, set Use Knowledge Base = yes and a confidence threshold. When the threshold isn't met, the fallback fires instead of the model guessing. Stronger lever: use a model that follows "if you don't know, say so" instructions — Claude family is generally better at this than smaller open-source models.
How often should I update the knowledge base?
Whenever pricing, products, policies or hours change. Q&A pair edits take 30 seconds. Article body edits the same. Changes take effect within seconds — no rebuild step.
Can different channels use different knowledge?
The Knowledge Base is shared across all channels (one source of truth per tenant). But you can run different chatbot flows per channel — each flow can use different node configurations, different system prompts, different escalation rules. Wire channels to different flows in Settings → relevant channel.
How much does AI usage cost?
You pay your AI provider directly per token used. MsgHub doesn't add a markup. Typical costs for an Indian SMB on Claude Haiku 4.5 or Gemini 2.0 Flash: $5–20/month for low-volume support, $50–200/month at higher volumes. Use the advanced "Use different API per feature" toggle to drop costs another 40–70%.