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

how to detect repeated question?
 
 

How to detect repetead question?

like

How are you?
How are you?
...

 

 
  [ # 1 ]

page 16, chatscript manual:

The following concepts are triggered by exactly repeating either the chatbot or oneself (to
a repeat count of how often repeated). Repeats are within a recency window of about 20.
“~repeatme”,”~repeatinput1”,”~repeatinput2”,”~repeatinput3”,”~repeatinput4”,”~repe
atinput5”,”~repeatinput6”,

 

 
  [ # 2 ]

Bruce, can you please (with apologies) offer advisement on the implementation here?

Currently, I have a line in my .top file that reads as follows:

topic: ~REPEATER priority nostay bot=RN1 (~repeatme ~repeatinput1)
u: () That’s what I said.

However, when I test this input.

Bot: Greetings.
Me: Greetings.

I get a segmentation fault. The rest of my .top compiles nicely and is even fully unit text tested and verified and so forth and I’m not getting any other segfaults from doing anything else. I see the text in the current version of the manual (I’m in 2.97) has this redded out, so maybe this is a known issue?

Many thanks.

 

 
  [ # 3 ]

No apologies needed. Sort of by definition any segmentation fault is MY fault regardless.


As it stands, the repeat SHOULD not even trigger because if the user says greetings, that will convert into the interjection ~emohello.  So if you crash, it is some more interesting place.  If you can compile the code using -g and run under gdb, then you could give me a backtrace of the stack. However, if you want me to debug I need a clearer notion of recreating this.  Could you email me your files?

 

 
  [ # 4 ]

Actually, my bad. I subbed out the actual text with “greetings” for simplicity reasons. I’ll send you the file, Bruce. Thank you!

 

 
  [ # 5 ]

Picking this back up:

So maybe my methodology is wrong here, but I assumed the proper way to implement my bot’s responding to repeated inputs would be to set up a topic in which I would catch these inputs, rather than have responders or rejoinders within specific topics. I have done so thusly:

topic: ~REPEATER priority nostay (~repeatinput1 ~repeatinput2 ~repeatinput3 )
u: (~repeatinput1) I got you.
u: (~repeatinput2) Heard you the first time.

But yet I am not catching anything.

What probably glaringly obvious thing am I doing wrong?

 

 
  [ # 6 ]

With an eye toward adding a repeat detection mechanism in AIML 2.0, I’m curious about how repeat detection works in Chatscript.  Specifically, what happens in the three cases below.  Suppose “Repeat!” is the response to a repeated input:

1. Simple repetition—seems obvious

Human: Yes.
Robot: Hmm.
Human: Yes.
Robot: Repeat!

2. Multiple sentence input—what happens when the same statement is repeated in one input:

Human: No. No. No.
Robot: Umm.  Repeat!  Repeat!

3. Is repeat detection context-dependent?

What if there was a hypothetical conversation like;

Robot: What is your favorite color?
Human: Green.
Robot:  Nice color. What is your last name?
Human: Green

The 2nd “Green” isn’t really a repeat of the 1st.  Can Chatscript detect this?

 

 
  [ # 7 ]
Richard Wallace - Dec 28, 2012:

3. Is repeat detection context-dependent?

What if there was a hypothetical conversation like;

Robot: What is your favorite color?
Human: Green.
Robot:  Nice color. What is your last name?
Human: Green.

The 2nd “Green” isn’t really a repeat of the 1st.  Can Chatscript detect this?

For the sake of polite conversation… It may be a repeat, if my last name is really: Smith.
However, your point about context sensitivity remains an interesting discussion.

 

 
  [ # 8 ]

Perhaps, 8pla, but the question relates to the mechanics of the ChatScript engine, and not the veracity of the querant, so I think that your supposition is somewhat moot.

In other words, you ain’t helpin’. raspberry

 

 
  [ # 9 ]

Firstly, let me set my tone, and make it clear I was not criticising Dr. Wallace.
I simply found the dialog he opened, something I thought about in the past,
so I briefly commented… Just in case, I just want to clarify that.

Let me offer a solution:  Use the repeat to your advantage, instead of disadvantage…

Response:  So your favorite color is the same as your last name.

Dave, you are the direct opposite of “ain’t helpin”...
That’s exacty the type of point I was trying to make ...  Moot! grin
It’s a good word, moot, but I just couldn’t think of it.

When it comes to context sensitivity, is it reasonable for a chatbot to be
somewhat moot sometimes?

 

 
  [ # 10 ]

Rob A:  Nothing obviously wrong, but may depend on what your sample input was. See below.

Richard: None of your examples trigger repeat.

1. CS is interested in repeats across volleys, not within a volley.
2. CS is monitoring the last 20 volleys.
3. CS only cares about “significant” repeats, where input is longer than 2 words. If the bot asks the human questions that can be answered yes or no, I don’t want triggering of repeat to happen just because human gave same input.

 

 
  [ # 11 ]
Richard Wallace - Dec 28, 2012:

With an eye toward adding a repeat detection mechanism in AIML 2.0, I’m curious about how repeat detection works in Chatscript.  Specifically, what happens in the three cases below.  Suppose “Repeat!” is the response to a repeated input:

1. Simple repetition—seems obvious

Human: Yes.
Robot: Hmm.
Human: Yes.
Robot: Repeat!

2. Multiple sentence input—what happens when the same statement is repeated in one input:

Human: No. No. No.
Robot: Umm.  Repeat!  Repeat!

3. Is repeat detection context-dependent?

What if there was a hypothetical conversation like;

Robot: What is your favorite color?
Human: Green.
Robot:  Nice color. What is your last name?
Human: Green

The 2nd “Green” isn’t really a repeat of the 1st.  Can Chatscript detect this?

-In my system, this also wouldn’t trigger any repeats. I never check repeats in a single input statement, but always compare it to previous logs. I also keep track of the nr of times the same statement was repeated in a row and present this to the use as a variable.
-Repeats aren’t checks against the text, but against the categories that were activated (which is why I allow the user to do some extra checks like verify the content of variables, before labelling it as a repeat.

 

 
  [ # 12 ]

Hey, again.

Bruce, thanks for the clarification and it’s interesting to see the conversation progress.

To take things more specifically back to my example code, I’ve tested with a few multi-word phrases and am still not getting any hits. Rather than processing the input as a repeat, the system follows the basic setup for gambit switching and suggests new topics.

To be even more specific, I was using the phrase “I like quadrilaterals.” I picked this as I currently have no topics that catch that word or concepts concerning shapes in general. Rather than picking up the repeated phrase, I, as I said above, just get the next line in the gambit and then see the system switching to other gambits once the initial gambit is exhausted.

I’d be curious to hear a little more about your (Bruce’s) first point about the delineation between repeats across volleys, rather than within a single volley, as this might quickly clarify the issue.

Thanks, all.

 

 
  [ # 13 ]

OK. I have gone and debugged the issue.  The current CS does not mark topics using repeatinput as the keyword, it only aimed to make it detectable as a pattern element.  I have corrected the source, and next release will allow it.

In the interim, you can have a global early topic that checks for “idioms” and marks appropriate topics and do this:

topic: ~testidioms system[]
u: ([~repeatinput1 ~repeatinput2 ...]) mark(~repeattopic)

This will create the effect of your topic being marked and available.

 

 
  [ # 14 ]

Terrific. Many thanks!

 

 
  login or register to react