AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Does every topic need a breakout category
 
 

Hi all,

Should I have a breakout category with every topic? I have different topics in my *.aiml file such as definitions, activities etc. If the user is in the definitions topic and gives unexpected input, I want the bot to respond in a particular way.  For example:
user: what is cracking
bot: Hacking is the activity of breaking into digital systems without authorization
user: what is ftps
bot: a protocol designed for transferring files securely
user: what is popcorn
bot: that is not a cyber security question

If the user is in the activities topic then I want a different response
user: how do I hack
bot: a complex question. Much depends on what you want to hack
user: should I hard code credit card numbers
bot: No
user: should I cook tonight
bot: This is usually not a cyber security activity

Pranav

 

 
  [ # 1 ]

By their very nature, “set” topics (ones that were previously set, and are still active) don’t expire or change on their own, so the short answer is yes, you need a breakout category for each response. The handling of <topic> tags actually varies a little from platform to platform, though, so the level of “importance” with having breakout categories for each topic will also vary. Breakout categories come in different forms, with the most common ones looking something like this:

<topic name="whatever">
  <
category>
    <
pattern>*</pattern>
    <
template>
      <
think>
        <
set name="topic">
          <!-- 
Change the topic to either an empty string, or to something else -->
        </
set>
      </
think>
      <!-- 
Bots response goes here -->
    </
template>
  </
category>
</
topic

Other types of breakout categories are more or less simply more complex versions of the code above. I hope this helps to answer your question.

 

 
  [ # 2 ]

Hi Dave,
Many thanks for your answer. It confirms my understanding of topics. Time to work on bot brain design. Right now, the brain is a monolithic AIML file.  <smile

 

 
  login or register to react