1

I'm trying to make my bot ask a question and reply depending on the answer. The question is something random, ending with 'how are you?'.

<aiml version = "1.0.1" encoding = "UTF-8">
   <category>
      <pattern>HI</pattern>
      <template>
          <random>
              <li>Hi! How are you?</li>
              <li>Hello there. How are you?</li>
              <li>Greeings. And how are you?</li>
          </random>
      </template>
   </category>

    <category>
        <pattern>GOOD</pattern>
        <that>* how are you?</that>
        <template>Happy to hear that.</template>
    </category>


    <category>
        <pattern>*</pattern>
        <template>Can you rephrase that?</template>
    </category>

</aiml>

If I reply 'Good', the bot will not understand and reply with 'Can you rephrase that?'.

Alexandru Antochi
  • 1,295
  • 3
  • 18
  • 42

1 Answers1

1

Try removing the question mark from the text inside your that tag. In AIML version 1 all patterns and 'that' tags should only use stars (*) underscores (_) or text in upper case. The upper case is more of a convention than an actual requirement.

Ubercoder
  • 711
  • 8
  • 24