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

A rejoinder control question
 
 

This question may be sort of specific. But please bear with me since I’m trying to learn how to control the bot further.

Say I want to enforce a predefined dialog between the bot and the user. The following rejoinder script works.

t: I am Jane.
u: NAME ( I be _*~1 ) Where are you from, _0?
  a: FROM (I be from _~location, and you) I’m form US.
  c: NICE (nice meeting you) You too. See you around.
    d: (~emogoodbye) ^gambit (~another_topic)
    d: () I don’t get it. Try again. ^setrejoinder(NICE)
  c: () I don’t get it. Try again. ^setrejoinder(FROM)
  a: () I don’t get it. Try again. ^setrejoinder(NAME)

To accept the correct follow-on question “I’m from xxx. And you?” , I need to handle multiple sentence input (simplecontrol.txt enabled) by something like below. But the script just breaks at that spot with ^next() or ^setrejoinder() that I can figure out.

t: I am Jane.
u: NAME ( I be _*~1 ) Where are you from, _0?
  a: FROM (I be from _~location)  ^next(input)  #don’t work, neither ^setrejoinder(FROM)
    b: (and you) I’m form US.
      c: NICE (nice meeting you) you too. See you around.
      d: (~emogoodbye) ^gambit (~another_topic)
      d: () I don’t get it. Try again. ^setrejoinder(NICE)
      c: () I don’t get it. Try again. ^setrejoinder(FROM)
    b: () I don’t get it. Try again. ^setrejoinder(FROM)
  a: () I don’t get it. Try again. ^setrejoinder(NAME)

Which Topic Functions to use in this situation? Or is there wrong concept in the script? Many thanks.

 

 
  [ # 1 ]

Harry’s simple control script handles only 1 sentence of input. A script that would act on multiple sentences (probably responding to each) would use something like this:
      $$response = %response
if (%response == $$response) {nofail(TOPIC respond(~xfacts_about_you))} # learn stuff
rather than comparing against 0. THen the system could reply to each input. 

A separate problem is decoding “And you” into the correct input. That requires bunch of patterns to consider the prior sentence and use ^input() fail(SENTENCE) to revise that input.

 

 
  [ # 2 ]

I’ve done that change in simplecontrol.top to enable multiple sentence input. Will try the input/fail sequence.

One side question: in the doc of ^setrejoinder() I saw the terms input rejoinder and output rejoinder. Looks like what I have here is output rejoinder. Then what is input rejoinder?

Thanks.

 

 
  login or register to react