After defining intents and entities, as a chatbot creator, you would typically focus
on designing the dialogue.
Creating a dialogue defines how your bot will respond to what the user is asking.
Dialogues in Watson conversation are defined visually through a user interface that is
structured around the concept of nodes.
Each node has a name, a condition, and one or more responses.
There are a few more bells and whistles available, but at its core we're talking about name condition
and responses.
The dialogue starts executing from the first node at the top.
If the condition is met, it will reply to a user with a response specified in that node
and stop the execution until the user has entered some new input.
If the condition is not met, it will skip the response and proceed to consider the next
node below.
If this second node's condition is met by the user's input, the nodes response will
be sent to the user.
If the condition is not met, we continue to the next node, and so on.
Essentially, the execution from top to bottom continues while the node conditions fail to
meet what the user inputs has entered.
For the condition you can use intents, entities, a specific entity value, and a few reserved
conditions like welcome, Anything_else, true and false.
You can also combine intents and entities with AND and OR logical combinations?
Typically you'd want to greet the user as they arrive.
So the first node might use a special word, "Welcome" as the condition.
Ensuring that that particular node is executed the first time that the user starts interacting
with the chatbot.
The response, we configured in that particular node, will be our initial prompt that greets
the user, inviting them to chat with our chatbot.
If the user input doesn't match any of the node's conditions, by default no response
will be provided to the user; and this isn't great from a user experience standpoint because
nobody likes to be ignored.
So it's a good idea to have also a node at the very bottom of the dialog that is always
executed if the user input failed to satisfy the conditions of any of the other nodes above.
The failover condition for this node is called Anything_else.
When will this note be executed?
In practice, when our bot has failed to understand the user.
So in this node we should have an appropriate response that invites the user to rephrase
or maybe suggest some queries that we know our bot can handle.
If we only included a single response in this node the bot could get annoying rather quickly.
Imagine seeing I don't understand over and over again.
Hopefully our user won't trigger the Anything_else node too often.
But it would be good to have multiple responses with some variation to them, even if they
all express the same concept.
It's a small detail that can affect the user experience and now intelligent our chatbot
appears to be.
These responses are executed sequentially by default, so the first time the user asks
for something that our chatbot doesn't understand, our Anything_else node will be hit, and it
will show the first response to the user.
When this happens again because the user enters something else that we don't understand, the
second response will be shown instead, and so on.
It's also possible to set the order as random, by clicking the "Set to random" link under
the responses block.
These two nodes handle such common scenarios that they appear by default when you create
a new dialogue.
That's quite handy since all you have to do is then customize them with what you want
in the prompt and what kind of I don't understand responses you want to include and send to
the user.
It's also possible to create children nodes.
These are considered for execution only when the parent node's condition is met first.
Normally the flow of execution for a particular user input is stopped once the condition is
met by one node.
We send back a response, wait for more input, and then restart the cycle evaluating this
new input against the conditions in our nodes top to bottom.
However if the matching node has children nodes, the execution continues with its children,
not with the main nodes.
If a parent node has multiple children, they are considered top to bottom.
It turns out, this is quite useful in practice.
In fact, it's common to have a parent node ask for further clarification to the user
in its response, and then handle the specific information provided by the user in its children
nodes.
For example the parent node might be triggered by the user asking, "I'd like flower suggestions
for a special occasion."
It doesn't provide information about which specific occasion, so the response from the
node might be, "which occasion?"
When the user replies with say, "Birthday," the child node that matches the
birthday condition will be executed and its response, displayed to the user.
For this to work, we'll need multiple children nodes, each having as its condition an Occasion
value like anniversary, funeral, etc., each having an appropriate response.
Alternatively, we can take advantage of the fact that responses themselves can have conditions
attached.
A node can have multiple responses that are only processed if their own condition is met.
So, instead of having multiple children nodes, one for each occasion, we could have a single
node that provides different responses, depending on which Occasion value is provided in response
to our request for clarification.
Children nodes can have children nodes of their own, giving us the ability to create
a quite complex dialogue flow.
Furthermore we have the ability to jump from one node to another.
Something that can complicate our dialogue flow, but, which will be necessary at times,
in order to accomplish what the chatbot needs to do.
Don't worry if this is a bit overwhelming?
We covered a lot of ground to give you a theoretical foundation.
When we create our chatbot in the next module, it will become much more familiar with how
we use parent, children nodes, conditions, and responses in order to define a convincing
conversation flow for our chatbot.
For more infomation >> Chatbot Course - Dialog [Build Your Own Chatbot] - Duration: 6:10.-------------------------------------------
Build a Donation Box | Design Squad - Duration: 6:47.
♪ ♪
(drill whirring)
Hi, I'm Anjali from Design Squad Global.
I'm here with Caleb.
We're meeting with Lea, who runs Arts at the Armory.
LEA: We have a project that we would love your help with.
We're a community arts and cultural center,
we do a ton of different events.
You know, music, theater, dance, opera, comedy, poetry, classes,
all sorts of stuff.
So, we're looking for your help to build a donation box here
for our front hallway so that as people come in to see a show,
to take part in a class, they have a nice, easy way
to donate money and support the great work
that we're doing here.
Tell us what you're thinking.
So, we need the donation box to be here in the front hallway,
so it's easy for people to see and to use,
no matter which room in the building they're going to.
It needs to be mounted, attached to something,
so that they can't just walk off with it.
It needs to be strong so they can't break into it,
but still easy for our staff to go in and take the money out.
And the last thing is we want to be able to put different signs
on it because we want to be able to swap the sign out to say
what we're fundraising for.
So, could we put it on the piano?
Yeah, as long as you find a way to attach it to the piano,
that would be great.
- Okay, sounds great! - We'll be back.
ANJALI: Once we got our instructions,
we went to Kevin Jackson's wood shop.
Hi.
KEVIN: Hey, guys.
What can I help you guys with today?
Today, what we're going to be doing
is we need to make a donation box.
My one bit of advice is-- I have a lot of stuff here.
I wonder if we couldn't look around and find something
that we could repurpose
instead of making something from scratch.
You guys can use anything you need here,
and let's get it done.
ANJALI: Kevin had a lot of great stuff in his shop.
We found an old flower box,
which was perfect for repurposing.
CALEB: Do you want to use this?
ANJALI: Yeah.
♪ ♪
We also found some hinges, screws, and a lock.
♪ ♪
CALEB: I don't think this is strong enough
to hold money in it.
Like, we should add some more protection to it.
ANJALI: Yeah.
CALEB: We can reinforce it.
And we should definitely also attach a lid.
CALEB: Yeah, we definitely--
With like a slit.
CALEB: Yeah, if we use a lid and a slit,
that means people can put money in.
I think we should also have a lock on this side,
so that people can put money in, but only the real owners
with the key can take it out.
We think that our first step would be to make a lid.
KEVIN: That sounds like a good plan.
Seems a little weak.
Do you think we should reinforce it,
maybe add some screws and blocks to it?
CALEB: Yeah, I mean, this is only attached by a staple,
so we should obviously add some reinforcements to that.
ANJALI: So, we probably want to take these feet off,
'cause they also make this box very wobbly, so...
Grab some safety glasses.
ANJALI: Kevin split the blocks off and showed us how wood
is strong in some directions and weak in other directions.
KEVIN: A board has grain that goes this way,
down the length of it, typically,
and if you get started in what we call the "end grain,"
then, whatever the natural direction of the grain is,
it'll split down that.
When we make things out of wood, we try to be mindful about that.
So, you can see that the wood was strong going this way,
but if we start to go down the length of it,
we can split it really very easily.
ANJALI: Once we measured everything,
we gave Kevin our dimensions.
We need a 24-inch by seven-inch lid,
and we need four two-by-fours that are five inches high.
Let's get it done.
(machinery whirring)
(saw buzzing)
♪ ♪
ANJALI: So, I noticed something.
The grains of the blocks are going that way,
while the grains of the box goes this way,
making it strong in both directions.
KEVIN: Based on what we were saying before, right,
that's going to make it much stronger because we have
grain running long-wise in one direction,
and we have grain running long-wise
in the other direction.
So we're using the grain of the wood
to make it as strong as possible.
(whirring)
ANJALI: Here's some hinges.
After we put on the hinges, we had to figure out
how to put on the removable sign.
I was thinking that we could either use corkboard
or a whiteboard, because the pro of having a whiteboard
is you can write whatever you want and it's easy to erase.
The advantage to having corkboard is that
you can put up new signs every day.
ANJALI: Corkboard is good, because you can use pushpins
and staples, and you can easily remove the signs.
So, we went with corkboard.
CALEB: After we cut the corkboard,
we glued it on with spray glue.
Everybody ready? CALEB: Yep.
ANJALI: Then, we had Kevin cut the coin slot.
(drill whirring)
We filed and sanded the donation box to make it smooth,
and then it was time to bring it to the Armory.
- Bye. - Bye.
ANJALI: Here it is!
LEA: Oh, awesome!
ANJALI: So, you can unlock it here.
You'll see that we reinforced the joints
so that if somebody comes in with, like, a saw or a hammer,
it won't easily break.
And it also has corkboard, we glued it and then we screwed it.
Awesome, fantastic.
So, let's see it in place.
So, what if we put it on the top?
ANJALI: We realized the donation box was way too high.
It's super high, guys. I mean if you have a little kid
who wants to put some money in, he's not going to be able to
without an adult's help.
So, what if we were, to like, put it on the side.
Yeah, I like that.
You can still any of the signs we put on the side,
it's really visible when people walk in.
I think that's a great idea.
ANJALI: We remove the front of the piano and the lid,
and bolted the donation box to the side.
So, we can bolt it right onto here.
We're drilling a pilot hole, which is a starter hole,
and then we're going to drill a bigger hole,
which we can put this carriage bolt in,
to secure the box to the piano.
There are drainage holes in the flower box,
which are perfect for the carriage bolts to go through.
There we go, now it's working.
We tighten the carriage bolts and made it really secure.
LEA: Thank you so much, guys.
This looks great.
ANJALI: We made the first donations, too.
CALEB: Okay.
ANJALI: Good luck!
Bye. See you.
ANJALI: Bye, thank you so much!
Arts at the Armory had a fundraiser soon after,
and the donation box worked perfectly.
♪ ♪
Không có nhận xét nào:
Đăng nhận xét