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

~no, any suggestions on handling complex variants such as ‘no not really’
 
 

I love the fact that I can simply use ~yes or ~no or ~emogoodbye etc to cover numerous variants.

However, I ran into some complex semantic cases which I need help on. I ran into a case where ~no wasn’t firing as expected and here is what I found:
:prepare no #Fires ~no as expected
:prepare not really #Fires ~no, which is good
:prepare of course not #Fires ~no, which is also good
:prepare no not really #Does not fire ~no, which surprised me
None of the emphatic ‘no’s such as ‘no no of course not’ etc fired ~no. Obviously, its difficult to semantically deconstruct such complex language within the engine (which already seems to do a great job of it), but does anyone have any suggestions on how to include the ‘emphatic no’ as a concept?

Another note to folks who might be just stepping into this as I am, I realized that a user’s response to a bot’s comment such as “Where do you plan to settle down? Or am I getting too personal here?!?” isn’t just a ~yes or ~no. Users might often just ignore the ‘advance apology for getting personal’ or also answer in a form using ‘ok’ which reverses the meaning of what you might be expecting. If they answer ‘its ok’, that falls into the same as ‘no its fine’ (~no) but answering ‘its not ok to get personal’ is like ~yes (yes that’s too personal). I would like to unify the ‘negated-ok concept with ~yes’ for such cases, but haven’t yet figured out a way to. Suggestions welcome!

 

 
  [ # 1 ]

Firstly, you can see exactly what is happening when you use :prepare, which for “no not really” shows:
Original Input: no not really
Tokenized Input: no not really
substitute erase:  really
Substituted Input: no not

which in turn means that “no not” would not translate into “~no”.  We can explore both why it doesn’t and how to make your phrase do so.  Adding phrases to the substitutes file is easy.  It is a pair of things per line, the first is what to find on input, the second is what to change it to.  Multiple words on input use _ in the pattern.  Multiple words on output use +.
< and > mean exactly at start and exactly at end.  Omitting the right side means delete (which is what happened to “really”). So you could write:
<no_not_really ~no
to get what you want or
<no_not_really> ~no
if you want exact match to all words of the input. or
no_not_really ~no
if you don’t care where the phrase is found in the sentence.

The current substitutes file has these:
<no_, ~no
<no_. ~no
<no_! ~no
<no> ~no
which shows it converts “no” at the start of a sentence only if it is followed by punctuation.  This is because “no doubt” or “no one” etc shouldn’t be converted to mean ~no. 
In a responder where you expect only yes or no, you can do this:
  a: (< [~no no] )  You said no
and of course you can make a concept: ~noanswer [~no no] and use that
a: (< ~noanswer ) you said no

as for negated versions,  concepts accept phrases, so if you have specific phrases, you can put them in your concept:
concept: ~noanswer [ ~no no “its not ok” “it’s not ok”]

though multiple-word concept items are size limited to I think 4 words.

 

 
  [ # 2 ]

and finally, you can write your own inputmacro and always use it to handle every pattern you want to do…

inputmacro: ^myno()
[ ~no
  (< no not really)
  (< I doubt it>)
  ...
]

a: (^myno() ) this is a no

the macro is a list of alternate choices. Some are concepts, some are entire sequences encased in ( ) which are requiring they start at the beginning of the sentence and one also showing the end of the sentence.

 

 
  login or register to react