Create a Chatbot using Microsoft Copilot Studio

Create a Chatbot using Microsoft Copilot Studio

In February 2023 Microsoft launched Copilot, a generative artificial intelligence chatbot. Though it has a tough competition against OpenAI or Google's Bard; quickly Copilot has picked up it's popularity when Microsoft announced Copilot Studio. Copilot Studio is a low-code development platform by Microsoft which allows developers to create own chatbot.

In this article we are going to learn step-by-step process to create your own chatbot / assistance tool.

Prerequisite:

To begin with, you will need a Microsoft Copilot license. Microsoft is offering 1-month free Copilot trial license. Below is the link:

https://learn.microsoft.com/en-us/microsoft-copilot-studio/sign-up-individual

After completing registration you will be re-directed to the Homepage of Copilot Studio, developers' playground for endless creativities.

Article content
Microsoft Copilot Studio Homepage

Let's create our first chatbot:

Step 1: Click on the Create button and then select "New Pilot".

There are many readily available templates for frequently used topics like a travel companion or store operations or simple Q&A bot etc., for this tutorial we will create a bot from scratch.

Our bot will help a novice user with Microsoft Word application.

Article content

Step 2 : Click on the Create button. We will keep things simple as of now and will make required configuration updates later.

Article content

Step 3 : Your copilot is now ready to learn and help. We will give our Copilot a name and define it's purpose. Click on that Little Edit button and add a name of your choice.

I will name my bot Clippy. (If you have used MS Office before 2007, you will remember Clippy, that little paper clip on the corner of MS Word screen :-))

After adding name and description click on Save.

Article content
Article content

Congratulations!!! You have successfully created your first chatbot.

Time to educate our Clippy :

Now we should teach our bot so that he can help our users about our product. To educate the bot, Copilot studio suggests uploading knowledge base articles in Word DOC or PDF formats; or you can provide external links as well. But there are few limitations.

  1. External Links can not be too deep. Max 2.
  2. Documents can not be larger than 3 MB.

For this exercise we have created a Word Document with some basic information about Microsoft Word. e.g. How to create a document etc. Let's assume our users does not know anything about Microsoft Word.

Our knowledge base looks like below. Keep in mind, this knowledge base documents are the most important part of your chatbot. The more descriptive you will be, the more useful your bot will be. Here are few suggestions while creating knowledge base.

  1. Be descriptive
  2. Use examples or scenarios
  3. Use guidance to solve a problem a user might face
  4. Add step-by-step guidance for actions

Article content

When you artifacts are ready, let's upload them in the bot. Click on the "Add Knowledge" button. We will use 2 artifacts here, one is the word document we have prepared; also we will user the help website from Microsoft.

To add an URL:

Add Knowledge >> Public Websites >> (After you add the URL; click on) Add >> Add

To add the document:

Add Knowledge >> Upload Files >> Drag n Drop the file >> Add

Note : Documents will take some time to be available for the bot, it depends on the size as well. Copilot reads those file behind the screen.

Article content
Article content
Article content
Article content
Article content
Article content

Congratulations !!!, Clippy is now a graduate and he is ready to serve the world.

Time to beautify our bot:

Now we will add the welcome message and some basic logics to our bot so that users can be greeted and answered properly.

Click on Topics tab on the top. Then click on All, to disclose all available topics.

Topics can be described as situations or triggers for our bot which will initiate a flow of actions.

We will start with "Conversation Start", as that topic is responsible to welcome our users.

Article content

Welcome message for users:

As soon as you click on the "Conversation Start", a flow chart will pop up. The Message tab holds the welcome message. We will modify that as per our need.

In this flow we will try to add some dumb options for the users, just to give to a demo what all features Copilot Studio has, to offer.

In the message box, modify the text and click on the Blue solid Tick, when you are done.

Article content

Add options for users to select :

Now we will learn how to add buttons for users to select multiple options instead of users writing most of the things.

Click on the + sign below Message box, from the drop down select "Ask a question" . In this Option we will let user select option and the discussion will continue based on that decision. We will add simple 2 conditions Yes or No . Also we will give an option so that user can contact Microsoft Support desk.

In the "Question" box, click on "Add Options" to add 3 options. Note the "Var 1" variable. Copilot studio is defining a variable for you and provisioning that to store the response from user, so that next actions can be taken based on the decision.

Article content
Article content

As soon as you have added those options you will see 3 conditions has been added down below. Now we will add the next steps for each conditions.

Article content

Add conditions for the decision users has taken:

If user selects the option to connect with Service Desk, we will redirect the user to Microsoft Help URL.

We will click on the + sign and add a Message with the URL.

After that we want the discussion with our user ends. Click on the + sign then select "Topic Management" >> "End Conversation".

This "End conversation" module will be used by the flow when the discussion ends.


Article content
Article content
Article content

Now about the option "No"

Same way we have added "End Conversation" for Service Desk option. We will add a good bye message and then send the flow to an end.

Article content

For "Yes" we do not need any option because we have already added the art factories which will be referred by Clippy.

Article content

Wow!!! We have made our bot, Clippy ready for the public. We will now Save the changes we have made and test our bot.

Click on the "Save" button.

Article content


Let's talk to Clippy:

We will now test our bot. Right hand pane on the Copilot Studio there is a section called "Test your copilot". Click on the circular arrow / refresh button beside it.

Notices, you have been greeted by Clippy the way you have taught him. Isn't it exciting?

Article content

Will ask Clippy about printing a document in Word. We will click on "Yes" option. And then type in the question. I am crying now, our Clippy has churned the best suitable segment from the artifacts and answered the question correctly.

Now we will ask about a topic, which was not part of the artifact. e.g. we have not mentioned anything about MS Team. See, how Clippy answers this question also correctly. Remember we have added one URL of Microsoft Help, Clippy is intelligent enough to refer that site when needed.


Article content


Hope you have learned to play around Microsoft Copilot studio. let me know in the comment section, what you are going to create with copilot?

Happy learning.




Nicely Done! Great DIY article of how to take advantage of Copilot Studio.

To view or add a comment, sign in

More articles by Debayan Mitra

  • 🚀 From JSON to Excel Table - Zero Coding

    Ever found yourself staring at a complex JSON file, wishing it could magically turn into a clean, readable Excel table?…

    3 Comments
  • Using OpenAI Library with Python

    OpenAI, GenerativeAI AKA GenAI and ChatGPT are probably the mostly used buzzwords in technology world since last couple…

  • Basic Structure of a Jenkinsfile

    What is Jenkins: Jenkins is an open-source tool, popular among DevOps practitioners. Jenkins helps to create and manage…

    2 Comments

Others also viewed

Explore content categories