Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Clarifying with an Entity6:33 with Ben Jakuben
An entity in Watson is used to clarify an intent, giving context and details about a user's request. Let's see how to create our first Entity to add context to the #turn_on Intent.
Now let's talk about the things our users want to turn on. 0:00 An entity in Watson is used to clarify an intent. 0:04 So in this example, it could be radio, headlights, basically appliances. 0:09 Let's go right ahead, Ben, 0:16 and let's create a new entity as we click the Entities tab. 0:18 >> Okay, Create new, here we go. 0:23 >> I like those routed bits that show up. 0:28 You can click Got it for it to not pop up again. 0:29 I usually do take my time and I read those hints and tips. 0:32 >> Cool, yeah, a little extra context is always helpful. 0:36 So you may ask yourself, well now that we are turning on something, 0:39 that's our intention, what are the type of things that won't be turned on? 0:44 Appliances is as such. 0:49 >> All right, yeah, let's call this appliances. 0:52 Well, as you think about appliances, let's give it some value. 0:55 So for example, I would think ac, that's an appliance. 0:58 >> And that's a good one for some synonyms as well. 1:03 You can also say air conditioning. 1:05 Yeah, fans is a good one. 1:10 Maybe even air conditioner. 1:11 >> I like it. 1:15 >> Cool. 1:16 >> Let's try a few more appliances. 1:16 Perhaps lights. 1:21 >> Lights good, yeah. 1:24 >> What are funky ways that you could say lights? 1:26 >> Well, headlights. 1:29 >> Headlights. 1:30 >> Bulbs. 1:31 >> Bulbs. 1:32 >> Yeah, good. 1:33 Tubelights maybe. 1:34 Cool, sounds good? 1:38 >> Very nice. 1:39 Let's try wipers also. 1:41 >> Okay, wipers. 1:43 I've heard that as wiper blades or maybe just blades itself. 1:45 >> Absolutely. 1:49 >> Yeah, how about a windshield wipers. 1:52 >> Windshield wipers works very well. 1:54 Just for the joy of it, let's add one more, say music. 1:57 >> Music's a good one, yeah. 2:01 >> And the synonyms in which you could issue commands to your car to turn on 2:06 music maybe. 2:09 >> Sure, radio, songs. 2:10 Should we even do song itself, or does it matter between singular and plurally? 2:15 >> In fact let's do song itself. 2:18 >> Okay. 2:20 >> There we're Ben, an interesting place to explore would be the system entities. 2:21 Now this is fantastic. 2:28 IBM has provided out of the box a number of system entities that 2:30 spares us from going through the trouble building these. 2:35 >> Yeah, that's very helpful. 2:38 >> Location, time and date. 2:39 We might find in some of our applications that we may want to turn on a certain 2:42 system entity, especially, or perhaps with location. 2:46 If we want to ask how is the weather, and your browser is aware, 2:50 geospatially aware, we would probably turn on the location system entity. 2:55 >> Cool, and we can turn those on, it looks like individually, or 3:03 we can turn all of them on if we want to. 3:05 >> Correct. >> Now before we try this out, Armen, 3:07 can I ask, back in the entity we just created, there was this checkbox, 3:10 I got it here, for fuzzy matching, right? 3:15 So here it says that it's in beta and it's currently off. 3:18 Is this something that we should turn on? 3:21 >> I've always had great fun with the fuzzy matching. 3:23 [COUGH] Frankly I think it helps more than it hinders, 3:26 although it might take a moment for the system to build. 3:31 Let's do a fun experiment. 3:35 Let's turn that on. 3:36 >> Okay. 3:38 >> And let's add another synonym to say any one of these. 3:39 To music, perhaps or- >> Okay, let's call it a music player. 3:45 >> Music player. 3:51 Now then do this, click the Chat icon. 3:54 Notice what's in this tray. 3:59 >> Okay, here we go. 4:01 >> This will take just a few seconds but 4:02 a lot of activities taking place on quite powerful servers. 4:05 Machine learning technologies right now are under way at this very moment, and 4:10 they are building new patterns based on these intents and 4:15 entities that we introduced to the system. 4:19 >> And I'm glad you brought that up because this is the kind of thing 4:21 whenever we make changes when we're adding new entities or 4:24 editing existing ones, we wanna make sure that Watson has a few moments 4:26 to train up on the changes before we try and test anything out. 4:30 Because otherwise, we might not see the changes right away. 4:33 >> I'm so glad you mentioned that, Ben, absolutely true. 4:36 Yes, that bit of a patience goes a long way with cognitive systems. 4:38 >> Okay cool, it finished, which means we can test it out. 4:44 All right, so I'm gonna clear my chat log again with a refresh,although it is live. 4:47 You can start hitting it right away. 4:51 So let's try it with turn on the radio. 4:53 And over here, if we scroll down, we have matched the intent, once again, 4:58 turn on with a high confidence. 5:01 And here in the entities, we have matched the appliances and 5:03 it has gotten a value here, the music value. 5:06 All right, cool, so it did match it. 5:08 Let's try one of our synonyms. 5:11 Let's say play rock songs. 5:13 And the same thing, we have matched the intent, here is the appliance, 5:17 and it has the input text here as play rock songs. 5:22 But it's mapped the value to music because again it knows that 5:27 songs is a synonym for music. 5:30 Really cool. 5:32 Armen, I'd like to try another experiment here. 5:34 I never had a card with a faucet, so 5:36 I'm gonna see what happens if I say switch on the faucet. 5:38 >> I love this experiment, sure. 5:42 >> All right, so in this case there is no entity, 5:45 it has no idea what we're asking about. 5:48 So the entities is blank and 5:50 it's worth investigating here that we get some warnings in the output. 5:52 It says no dialogue node matched for the input. 5:55 And that's because we haven't taken that third step yet. 5:58 We haven't created the dialogue. 6:00 >> Very true. 6:01 >> Cool, so at this point our Chatbot is able to understand what we want to do in 6:03 relation to turning things on. 6:06 Now we could take some kind of action if our Chatbot system here were hooked up to 6:08 an actual automobile, we could interact with the hardware and 6:12 turn these appliances on. 6:16 In this web based example, we won't turn anything on and off. 6:17 But we still need to have our Chatbot reply to the user. 6:20 The user will want to know if their intent was understood, and if anything happened. 6:24 Let's take a short break and 6:28 then we'll add the final artifact to the service, a dialogue 6:29
You need to sign up for Treehouse in order to download course files.Sign up