Ever looked back at your chats with customers and noticed your bot didn't act the way you thought it would? No stress! We're going to explore together how you can figure out why your bot isn't acting as it should.
Imagine you're talking to a robot that can understand and respond to you just like a human friend. That's what happens when we use NLP, or Natural Language Processing, in chatbot development. 🤖
When you ask your chatbot something, like "What's the weather today?" you're using what we call an "intent" - basically, you're showing your chatbot what you want to know. Behind the scenes, NLP is the magic that helps the chatbot understand your question as if it were a person, even though you're just typing words on a screen. It's like teaching the bot to speak and understand our language!
So, every time your bot seems to "get" what you're saying, remember, it's all thanks to NLP working in the background. Pretty cool, right?
For this tutorial, we're going to have some fun with our star of the show, the famous pizza bot!🤖🍕
Now, let's dive into a bit of bot-building basics. We've got one main task for our bot right now, called an "intent." This particular intent is all about ordering pizza. 📝🍕 We teach our bot this intent by showing it different ways customers might say they want to order pizza, like:
"I'd love a large pepperoni, please!"
"Can I get a pizza delivered?”
“I want to order pizza.”
Imagine you're chatting with a pizza-ordering bot and you say, "I want to order a pizza." The bot understands you want to order pizza because it knows about this kind of request. So, it quickly moves on to ask you, "Which pizza would you like to order?" This happens because the bot has been taught to recognize when someone wants to order pizza and knows exactly what to ask next.
Now, if your customers say something to the bot and it can't figure out what you mean, it always starts with a basic greeting or an introduction message. It's like the bot is saying, "Hello! How can I help you today?" because it didn't understand your request from the start.
Again, whenever a customer says they want to order pizza, and the pizza bot has already learned this phrase, it'll know exactly what to do! It'll jump into action. 👇
Sometimes, the pizza bot might miss the mark and not understand customer’s message. Picture this: your customers ask our pizza bot for recommendations on the best pizza, but if the bot hasn't learned this phrase yet, it might trigger the "not understood" block. 😕
But don't worry! This is totally normal in bot development. Building a bot is like a continuous journey of improvement. If you notice this happening, here's what you can do:
Before you release your bot into the wild, it's super important to test it thoroughly with various expressions to ensure it can understand. 😉
When we're building our chatbot, NLP (Natural Language Processing) behaviour is always on by default.
With NLP turned on even while collecting user inputs, our chatbot becomes a super listener, ready to act on what it understands. Imagine asking your customer, "To complete your order, what's your name?" 📝
But, if our customer, perhaps distracted by their craving, responds with "I want pizza" instead of their name, our super listener bot will catch that pizza cue and might ask, "Which pizza would you like?" 🍕 Oops, it missed the point but showed off its understanding skills!
Now, if we turn off NLP for collecting input, our bot wears its "serious hat." 🎩 It won't get swayed by mentions of pizza or anything else when it's asking for specific information. So, if it asks, "To complete your order, what's your name?" and gets "I want pizza" in response, it won't leap into the pizza menu. It'll stay focused on getting the name, keeping the conversation on track.
Disabling NLP can be good but also on the example below it can collect input that that you may not expected. Enabling or disabling NLP behaviour will depend on your bot use case.