DJ Bot - The bot who spins Dad Jokes - Part 1 - Overview

At Power Platform Saturday, Sydney conference, I presented this session “DJ Bot, the bot who spins Dad Jokes” with my son Dinel to a group of smart and enthusiastic young people.  This blog post series is based on learnings from building a conversational bot using Microsoft’s Power Virtual Agents and Power Automate products to spin dad jokes.

Check out the DJ Bot in action.

What is Power Virtual Agents?

Power Virtual Agents empowers teams to easily create powerful bots using a guided, no-code graphical interface without the need for data scientists or developers. Power Virtual Agents addresses many of the major issues with bot building in the industry today. It eliminates the gap between the subject matter experts and the development teams building the bots, and the long latency between teams recognizing an issue and updating the bot to address it. It removes the complexity of exposing teams to the nuances of conversational AI and the need to write complex code. And, it minimizes the IT effort required to deploy and maintain a custom conversational solution.

Check out the overview video from Microsoft.

Why do we need Chatbots?

Let’s say, you are going to start an online business. Selling Advanced Fidget Spinner which spins by itself. You have two people working for you. Your fidget spinner becomes a global hit and you started selling millions of them. Then you started getting hundreds of calls. Does it come in black? Do you have bigger sizes? Can I spin it upside down? All sorts of questions. So you end up answering these questions all day. Imagine, you have a bot who can answer all those questions for you. The bot can answer 24/7, you don’t have to pay for it except for the licensing fees, of course, most importantly, you’ll get your life back.

Basic Concepts

Power Virtual Agent Concepts

Topic

The first concept we need to understand is “Topic”. When we sign up for Power Virtual Agent and create a bot, it only really knows how to say hi and bye. If we want our bot to do something useful, we need to train it. The way we train our bot is by creating Topics.  Topic defines how the conversation will flow based on the responses of the user.

Topic

More details in Docs – https://docs.microsoft.com/en-us/power-virtual-agents/authoring-create-edit-topics

Trigger

There are two ways to trigger a topic.

  1. You can trigger a topic from inside another topic
  2. Based on what the human is saying.

When you are chatting to the bot, the bot tries to figure out what you are trying to say and what to do next. This is done by a technology called natural language processing. Once it figures out what you are trying to say, then it tries to find a matching topic.  Inside each topic, we can define more than one trigger phrase. If you don’t have any trigger phrases, the only way to trigger it from another Topic.

Trigger

Topic variable

In computer programming, a variable is a thing/object/container which can store information so that we can use it later. A topic variable in Power Virtual Agents is a variable to store information so that we can use in any step within the given topic. A variable inside one topic can’t be used or seen within another topic.

Topic Variable

Entity

Entities are an important part of bot training.   Entities can provide a bot with information to intelligently recognise relevant information from user input and use it later.  For example, Speed entity shown below, provides knowledge to the bot on how to interpret a specific type of user input and which information should be saved.

More details in Docs – https://docs.microsoft.com/en-us/power-virtual-agents/advanced-entities-slot-filling

Entity

Environment

The environment is the same as Power Apps environment or Dynamics 365 instances.  Transactional information of the bot is saved in Common Data Service (CDS) associated with the bot.  You can create multiple bots in the same environment.

Environment

In the next articles, I will demonstrate how I built the DJ bot using Power Automate and Excel Online.

DJ Bot, the bot who spins Dad Jokes – Part 2 – Authoring Canvas

DJ Bot, the bot who spins Dad Jokes – Part 3 – Integrating Power Virtual Agent with Power Automate

References

Docs – Power Virtual Agents overview – https://docs.microsoft.com/en-us/power-virtual-agents/fundamentals-what-is-power-virtual-agents

Thank you for visiting Dyn365Apps.com.

Follow me on Twitter – 

Until next time…

About the Author

Nadeeja Bomiriya is a Microsoft MVP, Chapter Lead – Dynamics 365 and Power Platform Saturday – Australia, Sri Lanka, Committee Member – Melbourne Dynamics 365 User Group, Technical Architect, and Dynamics 365 Practice Lead who lives in Melbourne, Australia.

Disclaimer: This blog post contains opinions of my own and not the views of my employer.

DJ Bot, the bot who spins Dad Jokes – Part 1 – Overview