Building Chatbots without Code
Ever thought of building a chatbot? What prevented you from building it? Scared of writing code? Well I’ve found an easier way to build chatbots without writing a single line of code. Follow along and I’ll show you how!
Chatbots make life easier. Whether you own a business, you’re self-employed or a professional, you might have come across a chatbot. Via text or speech, chatbots can be used to book appointments, order meals, transfer money, pay bills and even answer customers questions and queries.
Best part is chatbots can be integrated into so many platforms. For example, Facebook Messenger, Slack, Microsoft Teams, Skype. In this Demo, I’ll build a chatbot with Microsoft’s QnA Maker and Microsoft’s Azure Bot Service.
QnA Maker allows you build chatbots without writing any code. You get to build, train and publish your bots using FAQ pages, support websites, product manuals or SharePoint documents.
Azure Bot Service enables you develop intelligent, enterprise-grade bots. From a Q&A bot to your own branded virtual assistant, Azure Bot Service empowers you with all you need to quickly connect your users to the answers they need.
Now we know what our tools are and what they can do, let’s get started! For this demo, we’re be creating a Food Ordering chatbot for a food delivery company in Nigeria.
First, you’ll need to have a Microsoft Azure subscription. You can signup for a free trial. Visit https://azure.microsoft.com, sign in with your Microsoft account and click Try Azure for Free.
Fill in your details correctly in the page that follows and Sign Up. Wait for few minutes for your account to be fully set up. Once set up, you can start creating your chatbot.
Please be sure to deactivate and delete the resource group at the end of the test to avoid future charges since we’re just testing this out!
- Go to the QnA Maker Portal via https://qnamaker.ai and sign in with the Microsoft account you used to sign up for the free Azure subscription.
- Next, click on Create a Knowledge base, then select Create a QnA Service. In the new tab opened, you can create a QnA Maker Service in your subscription. Use the following settings:
For Resource group, you’ll have to create a new resource. Click on Create new.
For Website location, make sure it’s the same as your Azure Search location.
For App insights, make sure it’s disabled.
Then click Create. Wait for sometime for the deployment of the QnA Services and all other related resources to complete. When completed, you should see a page like the one below. Now step 1 in the QnA Maker portal has been completed.
3. In step 2, click Refresh to refresh the list of available QnA Service resources. Next, connect your QnA Service to your Knowledge Base by selecting the appropriate options for each section. At the end, you should something similar to this.
4. In step 3, enter the name of your Knowledge Base. For this demo, we’ll use My Food Delivery KB.
5. In step 4, we are expected to populate our Knowledge Base. We can do by either inputting the link to the FAQ section of a website or upload files in any of these formats .tsv, .pdf, .doc, .docx, .xlsx, containing questions and answers. I earlier created a pdf document containing questions and answers. You can download it using this link: https://1drv.ms/b/s!AsIgqNea9Kytam_1YPZYUTRrV90?e=hDfsUR
Then under the Chit-Chat section, we’ll select Friendly.
6. In step 5, click Create your KB. Wait for sometime while your Knowledge base is created, then review the questions and answer imported from the FAQ document and the friendly chit-chat pre-defined responses.
You can always add custom question-and-answer pairs to your Knowledge. Click + Add QnA pair, enter the question and answer.
Congratulations! You have been able to successfully create your Knowledge Base. Let’s train and test it..
Now that you’ve created your knowledge base, you can go on to train and test it. To start with,
- Click Save and Train at the top right corner of the page. This would save the KB and train it. This usually takes few minutes.
When the training has completed, click ←Test. It would open up a test pane. - At the bottom of the test pane, you can type in a message and start conversing with the bot. Something great about the QnA Maker is that even when we make an error while typing, it still gives you the right answer.
Let’s test the bot with some questions.
3. When you’re through testing, click — >Test to close the test pane. Now it’s time for the real action. Let’s finally create our chatbot.
- At the top of the current QnA Maker page, click Publish.
- Also in the Food Delivery KB(Publisher) page, click Publish. Wait till it is published and an end-point created. You should see something like this.
3. When you see this page, click Create Bot. This will open in a new tab Azure portal. You would then be able to create a Web App Bot with the credits in your Azure subscription.
4. When Azure portal opens up, use the following settings to create a Web App Bot. Note that some of the part of this form would have already been populated.
Bot handle: A unique name for your bot. In mine, I used Food-Delivery.
Subscription: Your current Azure subscription.
Resource group: The resource group containing your QnA Maker resource
Pricing tier: F0
Bot template: They include bot source code and services in 2 languages C# or Node.js. Since I’m a C# developer, I’ll pick C# as my SDK language and then click Ok.
Application Insights: Off
Microsoft App ID and Password: Auto create App ID and password
Once you confirmed that all fields have been filled correctly, click on Create and wait for your bot to be created!
5. When created, you would receive a notification that deployment has completed as shown in the picture below. Then click on Go to resource.
6. In the blade of the bot, view the Test in Web Chat page and wait till the bot says Hello and Welcome!
Tada Tada! You’ve successfully created your first bot! Way easy right?
Watch out for my next article on how to connect your bot to a platform such as Microsoft Teams!