Training AI with WhatsApp: The Ultimate Guide to Custom AI Chatbots

Training guide for Custom AI chatbot with WhatsApp

Welcome to Hoken Tech


In the realm of artificial intelligence (AI), using pre-built tools often doesn’t meet all our specific needs, and there are some limit to download apps from app store to our mobile device.


The rising accessibility of powerful and affordable AI technologies now allows us to train models with our personalized data, creating custom AI applications tailored to our preferences, we can manage to build chatbot, chatbot website, generate faq, recommendations, or able to send automatically email, offers, sales in minutes and in any language with a simple internet connection.


This guide will demonstrate how to create chatbot and to train a personalized AI chat model using your WhatsApp data, effectively creating a digital replica of your conversational style, inspired by a presentation from Aldan Creo.

Essential Elements for Your AI Chatbot

Before diving in, ensure you have the following:

  • WhatsApp account
  • WhatsApp chat text files
  • Google Cloud account
  • Sufficient credits for data training (approximately $5)

Extracting WhatsApp Data

Start by extracting the chats you want to model. Open WhatsApp and navigate to the chosen conversation in WhatsApp, click the three dots in the top right corner, and select "More" -> "Export chat" -> "Without media" (so no photo only whatsapp messages).


This will download a ZIP file containing a .txt file of your chat history. Repeat this process for each chat you wish to use.

WhatsApp chat - Hoken Tech
WhatsApp chat export chat - Hoken Tech
WhatsApp chat export data - Hoken Tech

Converting Text to JSON

With your text in hand, use a specialized tool by Aldan Creo.


Upload your .txt file and provide some personal details to improve the AI's accuracy. Enter your name as used in WhatsApp, so the user must match and can't be different and tap icon submit.

WhatsApp chat extraction - Hoken Tech

This will generate two JSONL files documents: training_examples.jsonl and validation_examples.jsonl.


Save the system prompt generated for later use.

WhatsApp data - Hoken Tech

Ensure the "Number of validation examples" is below 250 to prevent training failures on Google Cloud and have better answers when train chatbot.

WhatsApp number of validation - Hoken Tech

Creating a Google Cloud Storage Bucket

Next, create a bucket on Google Cloud to store your data. Visit the Cloud Storage page, open a new bucket, and give it a name, leaving other settings as default.


Note: You need to have a billing address to use Google Cloud services and features, so if you are asked to create a billing address, either create one from scratch or if you already have one, you need to connect it to the project development.

Google Cloud Storage Bucket - Hoken Tech

Upload your JSONL files code here.

Google Cloud Storage upload data - Hoken Tech

Training Your Model on Google Cloud

Head to Google Cloud's Vertex AI section. Ensure all APIs are enabled (note that billing information is required).

Vertex AI API - Hoken Tech

In the Vertex AI interface, select "Tuning/Optimization" to create a new optimized model. Choose "Supervised Optimization," name your model, select the model type (e.g., Gemini 1.5 Pro), and a server location.

Vertex AI training tuning - Hoken Tech

Continue by linking your training data under "Existing files in Cloud Storage" (if the training give some errors, disable the Validation toggle).

Vertex AI tuning validation - Hoken Tech

Start the optimization process and wait approximately six hours for training completion.

Vertex AI tuning complete - Hoken Tech

Chatting with Your AI Model

Once training is complete, use your model for real conversations. In the Vertex AI interface, navigate to "Chat" and select your trained model and region.

Google Cloud chat - Hoken Tech

Insert the previously saved system prompt into the "System instructions" field.

Google Cloud instruction prompt - Hoken Tech

For effective conversations, follow a JSON format like ["text", "another text"] due to the continuous chat nature like the whatsapp app work.

Google Cloud chat conversation - Hoken Tech

The effectiveness of your AI model largely depends on the quantity and quality of data you've provided. Thanks to advancing technologies, implementing AI has never been more easy and accessible for a lot of people in the world.


Tools like TrustWatch, which verifies luxury watches' authenticity, highlight the diverse applications of AI, available through platforms like the free platform AI Tool Explorer, where You can view and search helpful product, resource and solutions for business, enterprise, company based on your experience, from marketing, security, writing blog, integrations and so on.


Boost your AI skills and create a chat model perfectly aligned with your personal style today!

YOU MIGHT LIKE

Separator bar

nft, hoken tech, blockchain, cryptoart, eos, nft art, artificial intelligence, ai, watch authentication, crypto artist, nfts, web3, nft game, web3 game, videogame, nft distributor, videogame blockchain