Making Use of ‘Keywords’

Keywords work an absolute treat when combined with the regular teaching system (and with flows). Keywords are designed to pick up on specified topics, i.e. “lemons” – so that whenever somebody mentions the word  “lemons” – even as part of a larger query – your bot will respond with a reply, provided you have already created some answers for the query “lemons”.

If a user says to a bot:
“What do lemons taste like?”

If there is not already an answer for that specific query, the bot will recognize “lemons” and provide a response based on that. Keywords are useful for building a database of knowledge for your bot, which not only helps make your bot more interesting, but also helps you organize your bot’s knowledge base.  Keywords also work for phrases, meaning the types of responses your bot can have are greatly diversified.

You can teach your bot phrases like ‘Do you know’, so that whenever a guest asks “Do you know…” – i.e., ‘Do you know my name?’ – your bot can either respond with a programmed response to “Do you know…”, or answer the question specifically (if there is an answer for that specific question, i.e. ‘No, I don’t know your name. Sorry.’)

When teaching your bot to answer “Do you know…”, some good default answers include: Yes, No, I think so, I don’t think so etc. – so your bot can choose its own answers from a range you have already provided. It’s important to keep in mind that when experimenting with methods such as this, phrases like “Do you know” might appear in other parts of a sentence, which the bot will not be able to distinguish. For instance, if a user asks ‘How many countries do you know?’, the bot will mistake the context and respond with an answer for “Do you know” until you have established an answer for ‘How many countries do you know?’

The way you design these response mechanisms may greatly improve your bot. If you would like your bot to know the difference between contexts, teach them a framework from which they can discriminate different contexts. Have a different keyword for “Do you know”, as well as “How do you know”, “Why do you know” and ‘What do you know”  etc. Once you’ve laid the foundations for this system, you might want to ask your bot a range of questions including the phrase “Do you know”, so that it is easier for you to provide answers to those exact queries when teaching your bot. 

Good questions to start with include, Do you know your own name? Do you know my name? Do you know who created you?                    

Following this process with other conditionals/auxiliaries like could you, have you, do you, etc. your bot will seem to develop a personality of its own the more time you spend on it.

Keep in mind with keywords, your bot will detect them based on the order you have entered them into the “keywords” box. So if you would like to distinguish “Do you have…?” from “Do you have a…” in keywords, it is best to place the more specific one (“Do you have a…”) in front of the general phrase “Do you have…?” – that way, your bot will know what kind of question it is being asked.