AI Zone Admin Forum Add your forum
The name/nickname problem
 
 

From your experience what would you recommended for the following problem:
You implemented a Rivescript bot with dozens of rules. The bot has a name <bot name> (ex. john) and also one (or even a list of) nickname (ex. johnnie, jow, johnbot) that use can set:

+ i will call you *
- <set botnick=<formal>>Sure, why not? <get name> it is!

Then you realise some people have the habit of using john, johnbot, johnnie in the phrases like:

John, do you like me?
Do you like, johnnie?
Maybe, johnbot, you can explain that to me?

Making many rules go to star.rive (where every unexpected utttence goes).

How would you treat this? I want to promote alternative approaches, and don’t expect one best answer. This kind of problems make the bots challenge more interesting imho.

 

 
  [ # 1 ]

Perhaps instead of trying to handle multiple names and nicknames, simply have the bot restate it’s name to the user:

Sorry <username> but my name is <get name>. or Didn’t I earlier say my name was <get name>? or Please call me by my bot name of <get name>. or Sorry, but I’ve never cared for nicknames so please call me <get name>.

Those kind of statements help to eliminate too much confusion but still sound realistic as some people don’t care for nicknames either.

I’m sure there are other tactics that could be employed and I hope I’m understanding your situation. If not please provide a bit more detail.

BTW, Welcome!!

 

 
  [ # 2 ]
Art Gladstone - Nov 8, 2017:

Perhaps instead of trying to handle multiple names and nicknames, simply have the bot restate it’s name to the user:

Sorry <username> but my name is <get name>. or Didn’t I earlier say my name was <get name>? or Please call me by my bot name of <get name>. or Sorry, but I’ve never cared for nicknames so please call me <get name>.

Those kind of statements help to eliminate too much confusion but still sound realistic as some people don’t care for nicknames either.

I’m sure there are other tactics that could be employed and I hope I’m understanding your situation. If not please provide a bit more detail.

BTW, Welcome!!

This trick is nice Art Gladstone, but also if I had one bot name, it solves just part of the problem. I think the big problem here is to correctly ignore the bot name in requests like:

  • John, do you like me?
  • What is the name of the most famous actor in the world, John?
  • Maybe, John, you can explain math equations to me.

PS.: Sorry for the confusion, I misspelled the nickname reply part, it should be: - <set botnick=<formal>>Sure, why not? <get botnick> it is!

 

 
  [ # 3 ]

When speaking to my bot (locally, not online), I might only say its name once at the beginning salutations / hello. From that point on, there is no need for me to keep repeating the bot’s name because we know who each other is and anything said that uses the name becomes redundant. It is also something that most people in the USA seldom do. A lot of people simply know who we are (if good friends or acquaintances) when we see or meet each other and forego the name greeting altogether. Everyone’s home or country might have different customs of rules of behavior in this regard.

Aside from that, my bot knows that I am addressing it when I ask it something or make a statement to it.

At that point, the name is no longer an issue.

Please correct me if I’m missing your point.

Thanks.

Perhaps Noah can weigh in on this.

 

 
  [ # 4 ]

I have a substitution file for Mitsuku so if anyone says something like Mitsy, Mitsooo or whatever, she changes this into Mitsuku, says something like, “That’s Mitsuku to you” and then continues processing the sentence.

You can’t just delete the bot name from input, as the bot wouldn’t correctly reply to things like, “Mitsuku is a computer”. or “What does Mitsuku mean?”

 

 
  [ # 5 ]

Is one of your requirements that the bot can have a different name for each user? Or why don’t you use <bot name> to store the name?

If you use bot variables, you can easily enough handle aliases to their name via arrays or substitutions.

! var name John
! array name_aliases = <bot name>|john|johnnie|jonnie
// I *think* you can use <bot name> in arrays and they'll
// be evaluated at reply-time to have the current <bot name>
// but double check that (if not I think it's a bug that should be fixed!)

hello (@name_aliases)
* <
get name> != undefined => Hello back, <get name>.  // use user's name in reply
Hi there

You might also not include <bot name> in the name_aliases, and then you can handle triggers when the user uses a nickname the bot doesn’t like vs. when it uses the bot’s name properly.

hello (<bot name>|@name_aliases)  // when you don't care
Hi there!

can i call you @name_aliases
I'd prefer you call me <bot name>.

+ can i call you <bot name>
- That'
s my preferred nameso yeah
 

 
  [ # 6 ]

Art Gladstone, Steve Worswick and Noah Petherbridge, I appreciate all your answers and, after a careful thinking, there is no requirement for a different name for every user as long as I have a list of aliases.

Noah Petherbridge, I’ve tested your code using:

! array name_aliases = <bot name>|john|johnnie|jonnie 

and it works fine under Python-Rivescript. Actually I think I’ve found a bug in formatting bot variables:

! var name JOHN
! array name_aliases = <bot name>|johnnie|jonnie

hello (@name_aliases)
* <
get name> != undefined => Hello back, <get name>.
Hi there!

hello [*]
{lowercase}HELLOI AM <bot name>.{/lowercase} 

For ‘hello bot’ it gives the answer ‘hello, i am JOHN.’

And Steve, I understand I can’t simply delete the name from the input. So how would you address the name usage in all other cases it is not important? Like: ‘Mitsuku, do you like movies?’ or ‘What do you know Mitsooo?’. Do you have to predict in each template the usage position of the aliases?

 

 
  [ # 7 ]

I usually just delete the bot’s name from the input but also check the logs to add it in where necessary.
I don’t use Rivescript but in AIML, it would be:

<category>
    <
pattern>_ MITSUKU</pattern>
    <
template><sr/></template>
</
category

So: “WHAT DO YOU KNOW MITSUKU” becomes, “WHAT DO YOU KNOW”

 

 
  [ # 8 ]

Very nice Steve, I will try to find a way to work that out in Rivescript! Thanks.

 

 
  login or register to react