AIML and Category Sub Member Tags

One can do a lot with just the following value-pair table structure:

<category>
  <pattern>...</pattern>
  <template>
    ...
  </template>
</category>

But there is a way to increase speed of traversing a long table, use prior bot-client responses.
Old School:

1. <pattern />, client's current response
2. <that />, chatbot's prior response

Deprecated tags:

3. <justthat />, client's prior response
4. <justbeforethat />, chatbot's prior response
5. <beforethat />, client's prior prior response

More or Less New School:

1. <input index="1"/> is equivalent to <pattern />, client's current response
2. <that index="1,1"/> is equivalent to <that />, chatbot's prior response
3.
4.
 .
 .
 .
n-1. <that index="n-1,n-1"/>
n. <input index="n"/>

Now a chatbot can have ask the same question, and depending on the client’s prior context, give a more informed response.

What does Atomic, Default, Recursive have to do with AIM Chatbot?

Atomic example:
<category>
  <pattern>Hi, are you a chatbot?</pattern>
  <template>
    Yes, I am a Chatbot
  </template>
</category>

Default example:
<category>
  <pattern>Hi, are you a *</pattern>
  <template>
    Yes, I am a <star />
  </template>
</category>


Recursive example:
Client: Hi, are you a chatbot
Chatbot: What problem do you need solving
*,"[chatbot", is copied into the star tag. The srai tag causes the chatbot to re-evaluate the outputted template as a pattern tag.
<category>
  <pattern>Hi are you a *</pattern>
  <template>
    <srai>Yes I am a </star></srai>
  </template>
  <pattern>Yes I am a Chatbot</pattern>
  <template>
    What problem do you need solving>
  </template>
</category>

Leave a Reply