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 - that index
 
 

Onwards and upwards.

Can anyone let me know if I am on the right track with this tag.

<that index="nx,ny"/> 

I think I get it partly.

It’s a way of getting previous replies. So say the chat goes like this :

User: Hello
Bot: Greetings !
User: I think it’s going to rain today.
Bot : Maybe, I’ll check the forecast.
User : Thank you.
Bot : You are welcome.

So at this point to get the bot’s previous responses :

<that index="1,1"/> 

Gives : ‘You are welcome’

<that index="2,1"/> 

Gives : Maybe, I’ll check the forecast.

<that index="3,1"/> 

Gives : Greetings !

 

Is that right ?

So what’s the second parameter ny for please ?

I couldn’t find any examples of this in use, I’d be grateful if an example could be provided.

Thank you smile

 

 
  [ # 1 ]

Depending on whether your script considers a comma to be a sentence splitter, <that index=“2,1”> could just be “Maybe”, with <that index=“2,2”> being “I’ll check the forecast”. Generally speaking, though, a comma isn’t considered such, so how you have it is correct. If, for example, your second response was “Maybe. I’ll check the forecast.” (note the period, instead of a comma), then the second index comes into play, just as I described earlier.

For most cases, however, the “second index” isn’t really needed, and <that index=“2”> is all that is really required.

 

 
  [ # 2 ]

You’re a star as always Dave, thanks very much.

Does anyone use this much do you think ?

 

 
  [ # 3 ]

I was just trying to see where this would be useful.

Does it just insert the previous sentence verbatim ?

Say if I had this template…

<template>I did say ; <that index="2,1"/></template

The bot response would be :

I did say ; Maybe, I’ll check the forecast.

 

 
  [ # 4 ]

Nearly right but remember the indices work backwards:

Human: test
Bot: What are you testing? Not me I hope.

<that index=“1”> = What are you testing? Not me I hope.
<that index=“1,1”> = Not me I hope.
<that index=“1,2”> = What are you testing?

comma doesn’t act as a sentence splitter and so the response, “Maybe, I’ll check the forecast.” has no 2nd dimension to the index. In practice, nobody uses the second part to the index and as Dave says, <that index=“x”> is all that is required.

 

 
  [ # 5 ]

Thanks Steve that helps smile

I think I will code in the second dimension just for completeness.

 

 
  [ # 6 ]
Roger Davie - Oct 29, 2014:

You’re a star as always Dave, thanks very much.

Does anyone use this much do you think ?

With the “dual index”? Probably nobody, or at least very few people. Even Morti’s AIML only rarely uses even a single index, and then only rarely. Still, it’s best to maintain full compliance/compatibility with standards as much as possible, so I’d suggest coding for it.

 

 
  login or register to react