In this video, we're going to define intents for our florist chatbot.
As a reminder, intents represent the goal or purpose of the user question.
We train Watson on recognizing intents by providing it with examples.
What kind of intents do we need?
We can get started with chit chat.
This step of intents is common among most chatbots,
and it's not specific to our business domain.
Here, we'll provide our chatbot with a couple of chit chat intents,
but you're welcome to make your own chatbot much more well
versed in handling chit chat and off-topic questions from the user.
Chit chat may seem trivial,
but it helps chatbots appear more human-like and relatable,
and, therefore, more useful.
Inside our work space,
we are greeted by the intents tab.
Some of you might notice how the interface is now blue rather than green,
like in the earlier videos of this course.
This is because the Watson conversation team is constantly
improving the product and the user interface.
In this area, we can create intents,
and we can even import them from CSV files.
We could create an intent right away,
but I'll like to take an approach inspired by
what developers call test human development.
Let's call it chat room and development if you will.
The basic idea is that we first try
a question that we wanted the chatbot to be able to handle.
If the chatbot fails to address it correctly,
we try to implement the changes needed and test gain.
We repeat this process until the question is handled correctly.
The iterative process enables us to create the chatbot one step at a time,
and in my experience, it leads to fewer mistakes.
Let's open the try it out panel and try hello.
Watson doesn't know what to do with it because we haven't defined any intents yet.
So let's create an intent by clicking on the create new button.
We might call this intent, greetings,
since that captures the intent of the user fairly well.
We enter to create the intent.
As example for this intent,
we can add hello,
hi, hey, good morning,
good evening, and so on.
We can delete an example by simply clicking the minus circle next to it.
When we're good, we can click done and be done with the initial version of the intent.
If we decide to add more examples later,
we can do so by expanding the intent and clicking add new user example.
We can delete the intent altogether by clicking the trash bin icon.
We can also select specific intent examples,
remove them or move them to another intent.
We could, for example, even create a new intent directly from this
pop-up with the selected examples.
You'll notice that while adding examples,
Watson is training on them.
It can take a couple of minutes for Watson to fully train on
an intent depending on its size and complexity.
Once Watson is ready,
we can test again to see if our change worked.
This time, when we enter hello,
Watson correctly recognizes the greeting's intent.
Great. Now, let's see what happens when the user thanks the bot.
Let's type thank you.
We don't have an intent for that, so let's create one.
Notice how spaces are not allowed,
so we'll use an underscore between the words instead.
We can add a few examples of how people might express their thank you to the chatbot.
While we do that,
Watson has already started training,
as we can see in the try it out panel.
We wait for Watson to be finished training,
and once it does, we'll test again to
make sure that the intent is correctly recognized now.
Good.
Notice also that the detected intent is highlighted on the left by a blue rectangle.
When the try it out panel gets too crowded,
you can click the clear button to clear the panel.
At this stage, the user can greet and thank the chatbot.
I think that, at the very least,
we need to handle goodbyes. I know.
Those are very hard to handle. Let's see what Watson does when we enter see you.
Instead of not selecting an intent at all, he
went with the closest intent that we have, which is thank you.
So let's create an intent that is specific to goodbyes.
We can train Watson with a few common ways of saying goodbye,
and it will learn how to handle similar utterances.
We'll wait for it to train and then test again.
Tapping in see you once more,
Watson correctly recognizes the goodbye's intent.
Let's try something different,
something we haven't given to Watson as an example,
such as I'm going.
Awesome. Watson recognizes that that too is a goodbye.
Before moving on to domain-specific intents,
let's test out our three chit chatting intents.
Let's try a couple of inputs per intent.
Hello, hey, thanks, awesome, thank you,
goodbye and even, going.
Great. They were all correctly identified by Watson.
Note that, at this point,
we don't expect any response because we haven't defined the dialogue yet.
All we care at this stage is that Watson correctly recognizes all intents.