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

Chatbot Design: Assigning/Detecting Gender
 
 

I have to blame myself, this time. I tried to make a simple comparison comment, and ended up hijacking Victor’s GRACE/CLUES thread. Sorry Victor!

Anyway, my simple comment turned into it’s own discussion:

Merlin - Jan 30, 2012:

Victor,
Is Grace at the state where she can answer the question:

What gender is Jack?

I’ve been caught up with personal stuff, so haven’t been here in a few days. Sorry. downer

While Morti can’t yet answer that question directly (I’m adding that feature today), he does know the gender of over 3,400 different names, and if the name you give him as yours is on that list, he can tell you what your gender is. I just need to expand on that functionality, is all. cheese

 

 
  [ # 1 ]

Dave, that is the same approach that I have taken with Marie. She queries againist a database of known female and male names in an attempt to assign a gender to the user. Of course she does not assume since some names are androgynous, but continues to gather data through the course of converstation until a safe determination can be made. If the user corrects her as to his or her actual gender, then that data is added to the user’s profile.

 

 
  [ # 2 ]
Dave Morton - Feb 1, 2012:
Merlin - Jan 30, 2012:

Victor,
Is Grace at the state where she can answer the question:

What gender is Jack?

I just need to expand on that functionality, is all. cheese

If you look at the example:

Jack went to his closet and took out his new suit because he was going to a dance given by his great company

You should be able to tell the gender of Jack without a database.
This goes to the concept of automatic recognition of “named entities” and gender clues.

 

 

 
  [ # 3 ]

Merlin, that is absolutely correct, this is why I use word association in my parsing routine.

he/him/sir/mr/gentleman/boy/=male_gender.

The same would apply to the female suffixes.

 

 
  [ # 4 ]

That’s quite true, Merlin, but then again, I’m not trying to break new ground with Morti. I’m just trying to create something (someone?) to have a pleasant conversation with. raspberry Besides, I’m not quite up to the task of having my bot infer gender based on CLUES (sorry for the pun), so I have to employ other methods that are within my skillset. smile And let’s face it, that example sentence isn’t exactly common to a “standard” conversation, with an expected query about gender to follow, now is it? raspberry

 

 
  [ # 5 ]
Merlin - Jan 30, 2012:

If you look at the example:

Jack went to his closet and took out his new suit because he was going to a dance given by his great company

You should be able to tell the gender of Jack without a database.

Exactly Merlin!  not only that, but a very high priority also right now is to have Grace know that “he” == “Jack” in the above statement.

yes, anaphoric resolution.  Since Grace fully understands every part of that sentence, she can realize that she needs to resolve “he”.  She then can ask herself—how many male names (with probably a simple lookup table like Dave and Laura has pointed out).  She will see that there is only one PROPER NOUN mentioned, and that is Jack.  Thus it will be a simple matter to do that assignment.  In other sentences, where there are 2 male names, and a “he”, it will be more difficult, perhaps Grace will simply ask !

Actually, I was thinking of this question on my drive into work today “What gender is jack”.

The first thing Grace will ask herself is— Jack who?  If you are talking to Grace and suddenly, out of the blue, through “what gender is jack”? she will first have to ascertain “jack who?”.

So I think that is the very first step Grace should do.  Find out *specifically* who is being refered to.

But I think everyone here was thinking the question was more “What gender does the name Jack have?”  as opposed to “Is Jack a male or female” (that is, some specific person “Jack”.. is that person a male or female)... these are 2 different questions.    (btw, the old names was CLUES, the project is renamed GLI, I will , at some point, start a brand new, fresh thread).  ‘Grace’ is the first demo bot to be created from the engine.

 

 
  [ # 6 ]

Actually, Victor, I was considering the question to be “is Jack male or female?”, but I was willing to stereotype the name, as a sort of shortcut. I know a woman named Jaqueline (spelling?), who goes by Jack, so it’s entirely possible that Jack could be a girl, too. It’s just not all that common. Now a female named Dave? That’s another story. raspberry

 

 
  [ # 7 ]

A female named Dave… yeah… that’s getting weird lol.

Merlin, actually there are 2 reasons why we may not want to take the users input “Jack went to his closet and took out his new suit because he was going to a dance given by his great company” and automaticaly learn that Jack is a male.

First, what if they entered “Dave went to his closet and took out his new suit because she was going to a dance given by his great company” (got the idea from you Dave smile )  Here, someone that is trying to annoy our good Admin Dave is refering to him as ‘she” .. either because a) they want to provoke Dave, or b) they want to be ‘funny’ , or c) they made an error.  Either of these cases, we do not want to just take this “anonymous user” and allow them to update the main KB, do we?

Grace will have 2 sets of knowledge.  1) “verified truth” knowledge and 2) things that strangers to her.  If she never saw the word “jack”, and the user tells her it is male, she will only know that somebody told her that Jack is male.  I will have to approve the statement before it goes into her “verified truth” side of the KB.

She will perhaps believe you if you say “My name is _____”, but not “The world is flat”.  Eventually perhaps I will have more than just myself doing these ‘appovals’ .. perhaps some of you good folks on here!

Does everyone else on here have knowledge seperted into two compartments lke this? Or do you let just anyone change your bots “beliefs” smile ?

 

 
  [ # 8 ]

Well, given that my bot is AIML based, there’s not much in the way of things that users can change, and there’s nothing that they can change on a global scale. Personally, I think that there should be distinct areas of “fact”, from “immutable truths” that can’t be changed at all, to “gossip” which anyone can alter at any time, with several levels in between. I’m not entirely certain how these intermediate levels of fact could be altered, or what criteria would have to be used to determine if certain information or data currently stored should be altered, so maybe my notions are invalid. but this is how I view the idea, so there you have it.

 

 
  [ # 9 ]

Marie was built to be very dynamic in that she can tailor the converstation based on the known gender of the user and in addition suggest products or websites based on demographical data that is collected during the course of a session. This data is compiled, recalled and updated to the user profile and used on subsequent visits.

I looked at different scripting platforms like AIML and others, but there just was not the flexibility that I needed so I was forced to create my own from scratch. I am glad I have taken this route because I can basically do whatever I can dream up and sometimes with my imagination, no telling what that might be. wink

 

 
  [ # 10 ]
Dave Morton - Feb 2, 2012:

That’s quite true, Merlin, but then again, I’m not trying to break new ground with Morti. I’m just trying to create something (someone?) to have a pleasant conversation with. raspberry Besides, I’m not quite up to the task of having my bot infer gender based on CLUES (sorry for the pun), so I have to employ other methods that are within my skillset. smile And let’s face it, that example sentence isn’t exactly common to a “standard” conversation, with an expected query about gender to follow, now is it? raspberry

Yeah, I don’t know if it would be possible in AIML. But maybe in Chatscript.

The reason I am trying this (and think it is preferable) is so that you can eliminate the need for multi thousand name data base that would only be used in very limited circumstances. It also would handle aliases and ambiguous names like Chris which you could not do with a look-up table.

Does everyone else on here have knowledge seperted into two compartments lke this? Or do you let just anyone change your bots “beliefs”  ?
With Skynet there is multiple forms of memory.
- User variables
My name is…
My dog’s name is…

Short term conversational memory (reset at each conversation)
All men are mortal.

Long term Beliefs (only set by botmaster)
BOT name
Favorites, etc.

I am considering having multiple levels of “Trust”.

 

 

 
  [ # 11 ]

As to whether to “trust” the information given by the average user, I think you also have to gauge the “grammar level” that they use, as well. That probably sounds a bit odd, and perhaps even a little elitist, but consider this:
(please note that this opinion and observation, and is NOT backed up with any real data)
When I first started out writing things for other people (articles, forum and BBS posts, etc), what I would call “common grammar” (how the average, or “common” person composed their missives) was pretty close in quality to “formal grammar”, which is the term I use to describe the articles and such you would find in newspapers or magazines. Today, however, “common grammar” has declined in quality to the point where most of us have to guess at what’s been “written” (typed, whatever) in order to understand what they’re reading. Even here, where the quality of the text is considerably higher than most places, things like lol, or sry creep in (I know, I’m to blame, as well). It’s difficult enough for us humans to make sense of what most people feed our chatbots with, and exponentially more so for the bot to comprehend things like “l8r m8”, or “ur so gay”; especially if we’re trying to teach our bots good manners, along with good grammar.

Quite a ramble, yes? And it looks, for the most part, to have strayed from the topic a bit, so I’ll get to the point. If we can’t trust the “common” person to use good grammar, then how can we trust their information? Simply put, if they’re too lazy to use proper “speech”, then how can we trust their information gathering? What if they’re too lazy in that respect, too? That sounds harsh, I know. But it’s a lot less harsh than saying “stupid”, and those are the most likely causes for using poor grammar, in my humble opinion (please note that I didn’t use “IMHO”). This is the biggest reason why I removed Morti’s learning functionality.

Ok, rant over. Sorry. downer

 

 
  [ # 12 ]

Yes I agree users can teach bad habits and grammar to our bots if we open that door. In the release version of Marie users will have their own accounts, so if they want to teach Marie bad habits and grammar, they will be the ones that will have to live with it. tongue wink

However, real world knowledge from Wikipedia and other reputable sources gained from user searches will be updated to Marie’s global knowledge base. cool smile

 

 
  [ # 13 ]
Victor Shulist - Feb 2, 2012:

First, what if they entered “Dave went to his closet and took out his new suit because she was going to a dance given by his great company” (got the idea from you Dave smile )  Here, someone that is trying to annoy our good Admin Dave is refering to him as ‘she” .. either because a) they want to provoke Dave, or b) they want to be ‘funny’ , or c) they made an error.  Either of these cases, we do not want to just take this “anonymous user” and allow them to update the main KB, do we?

Or another more subtle option: Dave wanted his suit because some un-named lady is going to a dance. smile How long before your bot will realize simply taking out a suit is a weird response to someone going to a dance? How long before it can grasp that taking out the suit implies Dave will probably attend the dance as well?

Victor Shulist - Feb 2, 2012:

Grace will have 2 sets of knowledge.  1) “verified truth” knowledge and 2) things that strangers to her.  If she never saw the word “jack”, and the user tells her it is male, she will only know that somebody told her that Jack is male.  I will have to approve the statement before it goes into her “verified truth” side of the KB.

[...]

Does everyone else on here have knowledge seperted into two compartments lke this? Or do you let just anyone change your bots “beliefs” smile ?

It’s generally a good idea to separate new or “temporary” knowledge from permanent knowledge—not just due to the danger of other users, but also the danger posed by the bot itself! I’m more worried about my bot mis-interpreting someone and believing elephants are likely to run around in pajamas, so to speak. wink So trusted facts have to go through a trusted source. Same is true for how we all learn, I suppose.

 

 
  [ # 14 ]

Much of the “trust” issue depends on the purpose of the bot. If you can limit the responses back to the original user, then it is Garbage In Garbage Out (GIGO). Beyond that a forum/wikipedia model may be best, where people can provide input but there are editor/moderator designates who bestow/revoke trust. Like a small child, it takes time for a bot to learn who to trust and often they need a grown-up to intervene.

 

 
  [ # 15 ]
C R Hunt - Feb 2, 2012:
Victor Shulist - Feb 2, 2012:

First, what if they entered “Dave went to his closet and took out his new suit because SHE was going to a dance given by his great company”

Or another more subtle option: Dave wanted his suit because some un-named lady is going to a dance. smile

In fact, that is probably the only way that the sentence makes sense. SHE is someone Dave is interested in.

 

 1 2 3 > 
1 of 3
 
  login or register to react