-1

I´m a student from Germany. For my HIWI job at the university I have to program a chatbot in AIML 2.0. This project has already been started by another student and I am now expanding the chatbot. For about a month now, I've been trying to build a continuing conversation around the following question-and-answer scenario. When a user asks the bot "How are you?", the bot responds with "I'm fine. How are you feeling?". with the help of the tag, it now responds to the user's answer. If the user answers with "Fine", then the bot asks if it can help him with the lab. Now the second should actually react. But it does not. I always get the default answer. My question now is: Do I have to work with an index for two consecutive that-tags? Unfortunately I can't find anything about this on the net.

Thank you for your help.

1 Answers1

0

This is because you are not checking the correct contents of the <that> tag and so the categories are not being activated. Miss out the * wildcard in each of your last 3 categories and it should work. The that tag contains the last sentence the bot said rather than the entire bot output.

An example in English would be:

<category>
    <pattern>HOW ARE YOU</pattern>
    <template>I'm fine. How are you feeling?</template>
</category>

<category>
    <pattern>FINE</pattern>
    <that>HOW ARE YOU FEELING</that>
    <template>Great. Can I help you with the lab?</template>
</category>

enter image description here

Steve Worswick
  • 880
  • 2
  • 5
  • 11
  • Hey, thanks for your help. I've tried it but it doesn't work. – Lara Zürn Jan 19 '21 at 13:23
  • The first Question works as you've written but the answer on "Great. can I help you with the lab?" don't work out. In theory, the chatbot should again respond to the now following answer (Yes/No) with two different answers. This is how the conversation is supposed to be driven forward. – Lara Zürn Jan 19 '21 at 13:26
  • You now need to make two new categories with patterns of "yes" and "no" similar to the second one I posted but the that tag in both should contain "Can I help you with the lab" – Steve Worswick Jan 19 '21 at 23:11
  • Thanks a lot now it works. I've added an index in both that tags and now the chatbot answers the questions. – Lara Zürn Jan 22 '21 at 14:26