A Basic Bot using Azure Bot Services

I wanted to break out my comfort levels and do something different from Azure SQL Database or straight SQL Server. I really did try something new and created a Chat Bot using Azure’s Bot Service. Warning: I am a DBA by day (and night) so this is a fun post where I am trying out different areas of Azure so I apologise if you find this too basic – its Christmas lets have some fun!

It is split across two parts. First you have to create a knowledge base which I did via the QnA Maker tool. Then secondly you use this knowledge base and link it to your Azure Bot Service.

The knowledge Base

Go to www.qnamaker.ai


Click My Services and you will need to enter in your Microsoft Account.


You will be presented with the welcome page.


So what I did at this stage is upload a word document which had my conversation.

This is an example:

Q. Why are you so expensive? A. We are market leaders that’s why! (you get my point)

You have the ability to build inputs based on a word and should probably use synonyms of that word, for example the word HELLO = Hi/Howdy/Hey etc. That’s what I did anyways.


Next is the document upload.


The application will try to divide and understand your text into question and answers, if you think it has not correctly understood your conversation you can easily edit it here. Once you are happy you can test it.


Here is an interactive test.


Make changes via a  “Save and Retrain” else publish it.



Build the Bot Service

The next phase is to create the bot service. Naturally you need to login to the Azure Portal and then find the bot service.


Pretty straightforward so far.


In terms of template I selected the Q&A one.


During this stage we have to create a password and use it to authenticate the bot framework. You start this process by clicking on the create a Microsoft App ID button.


The password above should be pasted into the below screen.


Hit that important create bot button and it will link it to the knowledgebase created earlier on.


Next click the channels option.



I used the webchat channel where I take the URL (Not shown below but it is shown after the secret key section) and append the secret to it.

Simply its https://(URL +SECRET)


Paste it into your web browser and give it a go. Here is my webchat with my Bot. Enjoy!


The portal is amazing the stats available to you are well tracked and to be honest it is what I expect from the Azure.


I absolutely love the process explorer view too.


Drill down is possible by clicking on the PID.


By the way updating the knowledgebase and re-publishing even at this stage does update the bot service with no additional tweaking which is cool!

If you did not enjoy this post then I apologise and make no mistake I will be going back to Database related topics in the future.

Thanks for reading – Have a great holiday break.




1 thought on “A Basic Bot using Azure Bot Services

  1. Pingback: Dew Drop - December 20, 2017 (#2628) - Morning Dew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s