
We do this by replacing each occurrence of ‘loyalty program’ or ‘rewards program’ with ‘(%LOYALTY_PROGRAM.NN.SYN / (%REWARD.NN.LEX>%PROGRAM.NN.LEX))’, as illustrated below: (%SHOULD_I.PHR &^ %PAY_FOR.VB.MUL &^ (%LOYALTY_PROGRAM.NN.SYN / (%REWARD.NN.LEX>%PROGRAM.NN.LEX))) We start by updating each line of the language condition to make it match on both ‘loyalty program’ and ‘rewards program’.

We will thus in the following recombine the language objects so that the different phrases for asking about the pricing are combined with the different ways of expressing “loyalty program” or “rewards program”. The reason why the question “How much does it cost to join the rewards program?” did not trigger this flow is that ‘rewards program’ is not among the synonyms listed in the LOYALTY_PROGRAM.NN.SYN language object. (%WHAT_IS_THE_PRICE_OF.PHR &^ %LOYALTY_PROGRAM.NN.SYN) This is the language condition that has automatically been created from our positive examples: (%SHOULD_I.PHR &^ %PAY_FOR.VB.MUL &^ %REWARD.NN.LEX &^ %PROGRAM.NN.LEX) Having a closer look at the language condition If you have not yet created the ‘User wants to know if loyalty program is free’ flow, we recommend you to build it before you proceed. After having investigated what went wrong in the second part of the example conversation above, we improve the language condition by following two strategies:

In the following, we will shorten the language condition while at the same time broaden its coverage. User: How much does it cost to join the rewards program?īot: I am sorry, can you re-phrase your question? However, as soon as you slightly change the question, you will get a wrong answer User: How much does it cost to join the loyalty program?īot: You can join the loyalty program for free! For example, we created a syntax trigger that can handle conversations like the following:

#Understand synonyms how to
We have earlier seen examples of how to semi-automatically create language conditions based on positive example inputs. That creates a need to optimize the language conditions for your bot so that it can give the correct answer even when other words are used. In language, there are many ways of saying the same thing.
