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

RICH Learning examples
 
 

Several people have tried to access RICH(s) learning processes recently and havent quite hit on the syntax, so I thought Id publish an example here in case anyeone cares to give it a try in the future. There are no special commands such as “Learn” its all handled through NLP. This is an automated learning sequence.

Teacher: hello
Vince: Hi
Teacher: do you know anything about lobster
Vince: No, but now that you’ve mentioned I’ll remember.
Teacher: a lobster is red in color
Vince: Well I know what A lobster is, but I didnt know it had red color. Thank’s, I’ll remember that.
Teacher: a lobster can also be blue in color
Vince: Well I know what A lobster is and I know that it could be other colors, but I didnt know it could also be blue.
Teacher: a lobster has 8 legs
Vince: Well I know what A lobster is, but I didnt know it had 8 legs. Thank’s, I’ll remember that.
Teacher: a lobster has eight legs
Vince: I believe your correct about that, at least in some cases.
Teacher: a lobster has legs
Vince: As far as I know your correct about that.
Teacher: a lobster has 2 claws
Vince: Well I know what A lobster is, but I didnt know it had 2 claws. Thank’s, I’ll remember that.
Teacher: a lobster has two claws
Vince: I believe your correct about that, at least in some cases.
Teacher: a lobster has claws
Vince: As far as I know your correct about that.
Teacher: a lobster has 2 eyes
Vince: Well I know what A lobster is, but I didnt know it had 2 eyes. Thank’s, I’ll remember that.
Teacher: a lobster has two eyes
Vince: I believe your correct about that, at least in some cases.
Teacher: a lobster has eye stalks
Vince: Well I know what A lobster is, but I didnt know it had eye stalks. Thank’s, I’ll remember that.
Teacher: a lobster has eyes
Vince: As far as I know your correct about that.
Teacher: a lobster has a tail
Vince: Well I know what A lobster is, but I didnt know it had 1 tail. Thank’s, I’ll remember that.
Teacher: does a lobster have legs
Vince: Well A lobster is probably born with legs although it does not necessarily have to have legs My memory May be A little fuzzy though.
Teacher: does a lobster have eight legs
Vince: Well in at least some cases A lobster has eight legs. My memory May be A little fuzzy though.
Teacher: does a lobster have claws
Vince: Well A lobster is probably born with claws although it does not necessarily have to have claws My memory May be A little fuzzy though.
Teacher: does a lobster have two claws
Vince: Well in at least some cases A lobster has two claws. My memory May be A little fuzzy though.
Teacher: what color is a lobster
Vince: Well, in at least some cases A lobster is red.
Teacher: is a lobster red
Vince: Well, in at least some cases A lobster is red.
Teacher: can a lobster be yellow in color
Vince: Well, I know what an lobster is, but I dont know if it can be yellow in color. You can try saying “A lobster is [something]”. If I know you, I might take your word for it.
Teacher: can a lobster be blue in color
Vince: Well, in at least some cases A lobster is blue.
Teacher: does a lobster have eyes
Vince: Well A lobster is probably born with eyes although it does not necessarily have to have eyes My memory May be A little fuzzy though.
Teacher: does a lobster have two eyes
Vince: Well in at least some cases A lobster has two eyes. My memory May be A little fuzzy though.
Teacher: does a lobster have a tail
Vince: Well A lobster is probably born with tail although it does not necessarily have to have tail My memory May be A little fuzzy though.
Teacher: goodbye
Vince: Yeah see you later

There are still a few things to iron out, as you can see it still has problems with singular to plural in creating an object. Its best just to make something singular (Lobster instead of Lobsters) Some of the replies could be more accurate, for instance “Well, in at least some cases A lobster is blue.” would probably better reflect the logic if it stated that variations on coloring might reflect portions of an object rather than the entire object. (Carrots are orange, carrot tops are green…entirely green carrots are…Dr. Seusish) Originating attributes can be anything but only size, shape, and color are recognized as secondary attributes. Thats just a matter of programming time. There are still problems differentiating between theoretical and actual objects. Sometimes it correctly makes the distinction;

What color is a carrot (actual object, actual request)
What color is a blue carrot (theoretical object, logical request)

So that statements such as “Fido is a dog” will probably be interpreted as “I have a dog named fido” which creates an object named Fido with you as the owner.

and permutations on syntax are not always picked up, although these are usually assimilated into the library within an hour or so.

“Hi dee ho there friends and neighbors what the [redacted] do you know about [redacted] lobsters”

would probably be missed at first wink

Objects are persisted, attributes that are found to be incorrect are overridden during a back propagation pass.

Thanks to everyone who visits, your input is always invaluable

Vince

Oh, and I have NO idea why it suddenly decided that every “A” in a sentence should be capitalized LOL

 

 

 
  [ # 1 ]

Vince: Well I know what A lobster is,
Vince: Well, I know what an lobster is,

Did you notice the a->an change?

In my bot the existence of a capital “A” often indicates the AI thinks of the object as “A lobster” rather than “lobster”.

 

 
  [ # 2 ]

Thanks Merlin,
No actually I missed that but I will add it to the “to do” list.  Regarding the capitalization Ill look at that, but It looks like its just capitalizing the “A” anywhere it adds it to a sentence. One thing I would do if I was to build it all over again would be to make the logging even more verbose. Sometimes I would really like to know why it did what it did.
Vince

 

 
  [ # 3 ]

It’s been my experience that full, detailed logging, not only of what was “said”, but also of the processes involved, is of paramount importance to the development cycle. There are also times when “less is more” with regard to data & process logging, which is why I like to use multiple “debugging levels”, where each call to the logger is also passed a parameter that indicates it’s “priority”. (I’ve more to say on the subject, but I don’t want to hijack the thread cheese)

 

 
  [ # 4 ]

For my part Dave (barring spray painting on my garage door) your comments are welcomed wherever you want to make them! I agree on the multi level logging.

Id like to hear more about how you prioritize an event

V

 

 
  [ # 5 ]

The “Priority” level (probably not the best word to use there) ties in with the debug level, and works like this:
1.) The debugging level is set to an integer value between 0 and whatever (currently, I use a max level of 4); the higher the level, the more information is logged.

2.) events or actions that send data to the debugger/logger also pass a “priority” integer; again, an integer from 0 to whatever, with lower values being “more important” than higher values. The integer values have the following (rough) meanings:
    0: critical (non-fatal) execution/system errors (fatal errors can’t be logged because the script generally dies wink )
    1: system warnings and notices
    2: SQL queries
    3: navigation (which function is currently being processed, etc)
    4: Programmer comments or other non critical messages


Lately I’ve been toying with the idea of using a binary “bit mask” for the debug level, to provide greater control over logging. by using a bit mask/XOR arrangement, I can choose specifically which “event types” get logged, taking “priority” out of the equation (except for errors, which always get logged).

 

 
  [ # 6 ]

Cool stuff as always Dave!

For now Im going to have to content myself with data mining what RICH does log. I’m usually surprised at what is in logs once you start digging through them, although your way sure looks far easier!

Shoulda Woulda Coulda

V

 

 
  login or register to react