Understanding language isn't easy: it takes us humans about 6 years and hundreds of examples to understand the most common 20,000 words. It's not so different for computers either. To train an NLP engine, we need huge amounts of data. Luckily, we rely on pre-trained models that have a lot of smarts built in already.
Who are you?
NLPto navigate to the NLP module. Click the
Add Intentand name it
who are you
who are youintent in the Intents pane on the left hand side
Who are you?in the open text field
Greetingand add some expressions:
Update NLPbutton in the top right corner of the screen:
Updateto start the training. This can take a couple of minutes to one hour depending on the size of your chatbot. The more complex, the longer it'll take.
+ Bot message
who are youas the name
introductiondialog state as the parent (in the Settings tab)
Bot Messagetab and add a text message that says:
I am Choo Choo, your personal assistant for booking train tickets
introductionbot dialog as the parent dialog state in the
who are youbot dialog. Parent bot dialogs do not limit or define the possible flow of the dialogue. They are a visual tool to structure the conversational flow and keep an overview, which makes it easier to create complex conversational flows. Bot dialogs can be reached from any point in the conversation by linking a bot dialog to an intent, although you can restrict them too by using Contexts. This mimics the way humans talk, jumping from one subject to another.
Test your botat the bottom right to test your conversational flow. To get a feel of your bot's performance, ask the same question a couple times, including different ways of asking the question that are different to the expression you used to train. If a question is not correctly recognized, you'll have to go back to the
NLPtab, add the questions as an expression, and retrain the NLP model. You can do this as many times as needed, the model will just keep on improving.