You can add responses to questions from the "Training & Chat Logs" page in your bot's Admin Console, or by importing a response list file from the "Training & Chat Logs" page. You can also have the bot learn from conversations, or you can correct your bot's responses when chatting with it.
In addition to training your bot with simple responses like,
Do you like hockey?
I love hockey, it is the best sport.
You can also enter Pattern questions, and Template responses.
A Pattern is a question that can contains the '*' character as a wildcard. '*' will allow any set of words between the two words.
Pattern("* hockey *")
I love hockey, it is the best sport.
Now your bot will respond to any question about hockey with this response.
You can also use parts of the question in the response using a Template.
Pattern("Do you like *")
Template("Yes, I love {star}.")
You can also have multiple * variables in a pattern.
Pattern("Do you like * or *")
Template("I do not like {star[0]}, but I love {star[1]}.")
The code inside the {} is Self code. Self is based on JavaScript and supports most JavaScript syntax.
See, https://www.botlibre.com/forum-post?id=705860
In general patterns are not normally required, as the bot will automatically pattern match questions with questions that it knows a response for, and choose the best response.
You can define patterns and templates from the "Training & Chat Logs" page, as well as response list files and in scripts.
If you are familiar with the AIML standard, you can also import AIML from either the "Training & Chat Logs" page, or the Scripts page.
|