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..

AIML 2.0 question
 
 

hello everyone,i was studying AIML 2.0 Working draft by Dr Wallace and my mind blowed up grrr in a part that mentioned four tags : <input> <request> <response> <that> i cant undrestand what they do and even i have a question that are they useful?

I hope you anwser me Mr Worswick.

if anyone haves an opinion i would like to know it.

 

 
  [ # 1 ]

Yes they are very useful.

<input> is used to recognise what the user just said to the bot. So you could make a pattern like this:

<category>
<
pattern>WHAT DID I SAY</pattern>
<
template>You said "<input index="2"/>".</template>
</
category

The index indicates how far back in the conversation you want to go. So index=“1” means the current input. index=“2”, the 2nd to last and so on. In the category above, you wouldn’t want to use index=“1”, as it would go like this:

Human: Hi
Bot: Hi
Human: What did I say?
Bot: You said, “What did I say?”.

<that> is one of the tags used to keep context of the conversation and records what the bot has said so if the user answers something like “yes”, you at least have a clue what they are talking about.

<category>
<
pattern>YES</pattern>
<
that>DO YOU LIKE ME</that>
<
template>Aw thanksI like you too.</template>
</
category

<request> is the same as <input> but handles multiple sentences.
<response> is the same as <that> but again, handles multiple sentences.

Without trying to confuse you, if either you or the bot utters more than one sentence at a time, <input> and <that> will only store the last sentence and so you need to add an extra dimension to the index. Let us imagine the bot has just said:

Bot: Hi Karen. Hope you are enjoying AIML. Do you have a chatbot?

<that> would be “Do you have a chatbot”

If you wanted to refer to other parts of <that>, they are stored as:

<that index=“1,3”>Hi Karen
<that index=“1,2”>Hope you are enjoying AIML
<that index=“1,1”>Do you have a chatbot

(Notice how the index is stored in reverse)

where <response index=“1”> would be “Hi Karen. Hope you are enjoying AIML. Do you have a chatbot?”

I would concentrate on <input> and <that> while you are just learning AIML. The other tags are useful but you should learn the basic ones first.

I would STRONGLY advise learning AIML 1.0 before trying to master AIML 2.0. Not to do this would be like trying to learn advanced physics without first learning physics.

Hope that helps. Feel free to ask any further questions and I will be happy to help.

 

 
  [ # 2 ]

thank you very much Mr Worswick.

 

 
  login or register to react