Complex Language Understanding & Execution (CLUES) Engine

  • 107 Replies
  • 29954 Views
*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #30 on: September 23, 2010, 06:57:44 pm »
Ah, I see, thanks for explaining that.  I'm really looking forward to the day things come to life  8)

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #31 on: January 27, 2011, 09:44:25 pm »
---------------------------------------------------------
Ok, finally an update for CLUES
---------------------------------------------------------

victor@r2d2:/clues$ ./clues

GRACE version 0.1 (on CLUES version 0.8 )

<user says> What did Jack do

<Grace says> Sorry, I wasn't able to come up with an answer to that question.

<user says> Jack went to his closet and took out his new suit

Yes, I believe I understand!

<user says> What did Jack do

<Grace says> jack went to his closet and took out his new suit

<user says> What did Jefferson Davis Hogg do

<Grace says> Sorry, I wasn't able to come up with an answer to that question.

<user says> Jefferson davis hogg went to his closet and took out his new suit

Yes, I believe I understand!

<user says> what did jefferson davis hogg do

<Grace says> jefferson davis hogg went to his closet and took out his new suit

<user says>
*Note 1 - this very first sample I/O does not illustrate the power of the engine, since a very simple script with regular expressions could do this.

*Note 2 - the above is NOT using simple templates/pattern matching.  Believe it or not, the bot has a complete understanding of what was said by first generating many parse trees… for *BOTH* the ‘fact’ *and* the question.

Among many parse trees, the chosen ‘fact’ parse tree Grace chose was:

pos = simple-sentence
subject.num-noun = 1
subject.noun.1.val = jack
num-predicate = 2
predicate.1.num-verb = 1
predicate.1.verb.1.val = went
predicate.1.verb.1.num-prep-phrase = 1
predicate.1.verb.1.prep-phrase.1.num-prep = 1
predicate.1.verb.1.prep-phrase.1.prep.1.val = to
predicate.1.verb.1.prep-phrase.1.num-noun = 1
predicate.1.verb.1.prep-phrase.1.noun.1.val = closet
predicate.1.verb.1.prep-phrase.1.noun.1.num-adjective = 1
predicate.1.verb.1.prep-phrase.1.noun.1.adjective.1.val = his
predicate.2.num-verb = 1
predicate.2.verb.1.val = took
predicate.2.verb.1.num-prep-phrase = 1
predicate.2.verb.1.prep-phrase.1.num-prep = 1
predicate.2.verb.1.prep-phrase.1.prep.1.val = out
predicate.2.verb.1.prep-phrase.1.num-noun = 1
predicate.2.verb.1.prep-phrase.1.noun.1.val = suit
predicate.2.verb.1.prep-phrase.1.noun.1.num-adjective = 2
predicate.2.verb.1.prep-phrase.1.noun.1.adjective.2.val = new
predicate.2.verb.1.prep-phrase.1.noun.1.adjective.1.val = his
predicate-list-type = and


*** Now, also for the question input, Grace also generates parse trees, and, again, using semantic inference, decides which parse tree the user really meant…

pos = simple-sentence
num-question = 1
question.1.val = what
subject.noun.1.val = jack
subject.num-noun = 1
predicate.1.num-verb = 1
predicate.1.verb.1.val = do
num-predicate = 1
predicate.1.verb.1.num-auxiliary-verb = 1
predicate.1.verb.1.auxiliary-verb.1.val = did

So with the “QPT” (question parse tree), Grace goes in and tries to find a “FTP” (fact parse tree) which can answer the question.

In the above, Grace matches the subject (subject.noun.1.val) in the FPT which is “jack”, with the subject mentioned in the QPT.

Since this is all done with FULL grammatical and semantic inference, and not by simple pattern matching, the system will evolve, and learn, to cope with extremely complex sentences and ambiguity.

For example, in the above, note that Grace knows there is one question, but we may ask : “Who or why did….” (in that case, num-question would be 2).

Next, I will be working on tests like:

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

and ask:

Where was jack going?
Did jack take out his new suit? why?
Where did jack go?
Did jack go to a dance?
Has jack ever been at a dance?

Stay tuned !  Much work ahead of me! !
« Last Edit: January 27, 2011, 09:50:27 pm by victorshulist »

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #32 on: January 28, 2011, 12:32:22 am »
Victor,

Very nice work and the parsing / parts of speech routines seem to be working quite well.

Could a future construct or incarnation enable one to "teach or feed" it information then
act as an expert system providing answers and enabling discussions of the "learned"
topics? That would really be interesting as both the person and the program could engage
in a discussion of the material with the human doing more probing and the program providing
more answers.
It would make a great platform for children's educational studies, book reports, short stories,
creative writing, reports, etc.

Please keep us posted on your progress! O0

« Last Edit: January 30, 2011, 02:13:46 pm by Art »
In the world of AI, it's the thought that counts!

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #33 on: January 29, 2011, 08:23:41 pm »
Yes, absolutely...

check this out...

* * *

Short demo showing Grace’s ability to deal with synonyms and complex sentences simultaneously :

* * *

GRACE version 0.1 (on CLUES version 0.8)

(running in mode: sqa-test)

<user says> what did henry do

<Grace says> I understood your question, even ran some code, but sorry, I wasn’t able to come up with an answer.

<user says> henry went to his closet and took out his new suit since he was going to a dance given by his company

Yes, I believe I understand!

<user says> what did henry do

<Grace says> henry went to his closet and took out his new suit (because he was going to a dance given by his company)


I can use either “because”, or “since”, or even internet lingo “cuz” (yes, bad, no such word, but people use it).

I have her place the REASON (if she knows it) in parenthesis

------------------------

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<user says> henry went to his closet and took out his new suit

Yes, I believe I understand!

<user says> what did henry do

<Grace says> henry went to his closet and took out his new suit

<user says> where did henry go

<Grace says> to his closet

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here we can see proof of Grace’s understanding and ability to know what portion of the input answers the question of WHERE henry went.  That is he only went “to his closet”, but when asked WHAT henry did, she replies with “henry went to his closet and took out his new suit”.

Note, a simple template / regex based system may have responded with:

Where did henry go?

to his closet and took out his new suit

because of simple match of:  henry went to (*)

That is, Grace is NOT fooled into just matching wild cards after things like "went to" because she uses parse trees, and not simple templates or regular expression matching.   She uses parse trees and SEMANTICS  8)

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #34 on: January 30, 2011, 02:24:23 pm »
Very nice work.

How would Grace have responded to the question, "Why did Henry go to the closet?"

Obviously, we know the answer but it's always a good way to test the full abilities by offering some negative or unrealistic questions and examine the responses.

Perhaps Grace might reply by saying, "Because his suit was in there."

The program is developing nicely. Do you plan on making it as a "stand alone" program for conversational banter and testing or strictly a logic platform for language?
In the world of AI, it's the thought that counts!

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #35 on: January 31, 2011, 01:21:53 am »
Hi Art, and thanks.

Well, Grace is VERY much a young child right now...  She replied to that input by:

"I couldn't generate any parse trees from your input."

Because she has much, MUCH more to learn about grammar right now.   I have about a month or two of grammar production rules to teach her, then she won't say the above, but will instead be able to produce a parse tree for that question.

You see, in this bot, no input is analyzed just by the line of text input, and certainly not a template... what I mean is, even questions are first generated into parse trees, and analyzed (very analyzed) to determine if the system truly understands both sentences and questions (or commands).   So obviously the first order of business for Grace is to determine if you are telling it a (a) fact, (b) questioning her, or (c) commanding her.

So, in the next few weekends I will be educating her on the PTGens (parse tree generators) that she needs to understand the question you asked , as well as  many others for that same input (Such as "What dance did Jack go to?", respond could be "The one his company arranged.".

I am getting feedback from everyone for questions that she should answer based on this sample sentence, and, in the next little while, she will be answering them, (and I will be posting the conversations here).

I plan to develop the CLUES engine (that powers Grace - she is only one 'personality' right now), to be both, for logic, domain-specific (teach her everything from science, technology, physics, or even talking to her about tax planning!), and also a 'chat buddy' :)

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #36 on: January 31, 2011, 10:27:05 am »
Thanks for the explanation.

Is Grace able to or going to be able to identify whether a person is questioning her by the person's use of punctuation (question mark) or by the use of certain words that would likely indicate a query such as: Who, What, Where, When, Why, How...etc? I would think the words would be more weighted than punctuation as a lot of people these days, simply forget to use it or figure it is implied by use of those queried words Who, What....

Do you think the program will eventually obtain the ability or methods to parse sentences quickly enough to allow it to maintain fairly decent conversational flow without lagging?

Thanks!
« Last Edit: April 03, 2011, 08:22:03 pm by Art »
In the world of AI, it's the thought that counts!

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #37 on: January 31, 2011, 02:09:03 pm »
Hi again

Good questions by the way.

1.  To determine if the input is a (a) statement, (b) question, (c) predicate (aka command), (d) a noun,  (e) prepositional phrase, will all be done using in-depth grammatically *and* semantic analysis.    Right now Grace doesn't mind if you don't have "?" at the end of the sentence, that is, she already knows by the structure of the parse tree and usuage of one of a set of what I call "question words" (what, is, did, could, should).    Grace also knows that if you enter what is determined to be a statement but if you place a "?" at the end, then she considers it a question.   For example, if you enter  "You are smart" she will consider that as you TELLING her she is smart (which of course is correct), but if you enter "You are smart?" then, even though she determines that is a STATEMENT (and not a question), she will consider it a question since "?" appears at end.  This is all within her current functionalities. 

2. For speed yes - I have placed a very high priority on real time or near real time.    My original parsing engine, being a  deep-parsing engine, and written using a lot of string manipulation and also a lot of regular expressions, took a very long time to process (22 word input took about 18 seconds!!) , but now, that same sample sentence, I enter the sentence, and as soon as I hit enter it has a response!   I have used a lot of clever caching techniques and also use ONLY integers to represent data, (no strings, no concatenation, no regular expressions),this allowed for an absolutely ASTRONOMICAL increase in speed, so yes, now it is pretty much real time :)

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #38 on: April 03, 2011, 05:32:48 pm »
*
More basic testing of the system's ability to understand and test its understanding via some Q & A...




------------------------------------------ Test Case 01

[clear directory temp-sqa-test]

<user> did jack take out his suit

<Grace> Sorry, I don't have an answer for you.

<user> jack went to his closet & took out his new suit cuz he was going 2 a dance

<Grace> Yes, I understand.  I have stored that information in 'temp-sqa-test'

<user> what did jack do

<Grace> I have more than one answer for that....

<Grace> went to his closet

<Grace> was headed to a dance

<user> did jack take out his suit

<Grace> If you mean *new* one, then yes.

<user> did jack take out his expensive new suit

<Grace> Yes, but I'm not sure if it was the *expensive* one.

<user> did jack take out his new suit

<Grace> Yes.

<user> did jack take out his expensive old suit

<Grace> I have more than one answer for that....

<Grace> Yes, but I'm not sure if it was the *expensive*, *old* one.

<Grace> If you mean *new* one, then yes.

------------------------------------------ Test Case 02

[clear directory temp-sqa-test]

<user> did jack take out his suit

<Grace> Sorry, I don't have an answer for you.

<user> jack went to his closet and took out his suit because he was going to a dance given by his company

<Grace> Yes, I understand.  I have stored that information in 'temp-sqa-test'

<user> did jack take out his new suit

<Grace> Yes, but I'm not sure if it was the *new* one.

<user> did jack take out his expensive old suit

<Grace> Yes, but I'm not sure if it was the *expensive*, *old* one.

<user> did jack take out that expensive old suit

<Grace> I have more than one answer for that....

<Grace> If you mean *his* one, then yes.

<Grace> Yes, but I'm not sure if it was the *that*, *expensive*, *old* one.

<user says> what did jack do

<Grace> I have more than one answer for that....

<Grace> went to his closet

<Grace> was headed to a dance given by his company

<user> where did jack go

<Grace> I have more than one answer for that....

<Grace> to his closet

<Grace> not sure if he/she made it, but he/she was headed to a dance given by his company

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #39 on: April 03, 2011, 07:53:12 pm »
Nice work Victor - your system really seems to be coming together now, and dare I say; sounds quite smart.

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #40 on: April 03, 2011, 08:30:51 pm »
Victor,

I agree that your experimental conversationalist is progressing nicely!

There was a moment during the first conversation where the program replied,
<Grace> Yes, but I'm not sure if it was the *expensive* one.

This would naturally lead me (or perhaps any other person not familiar with
your program to conclude):
User>Does Jack have more than one suit? (or perhaps several?)

If you had replied, "No, the inexpensive suit." would it have changed the logic
of the program that might actually believe that Jack only owns just ONE suit?

The mind of the machine is quite interesting.

Please keep up posted on your progress as this is the stuff that helps to float our boats!! So-to-speak!!;)

 ;)
In the world of AI, it's the thought that counts!

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #41 on: April 03, 2011, 10:47:06 pm »
Freddy,

Thanks, and this is only in the EXTREME early stages.

Much, much hard work to do.   But I have a road map that will take me there!

Art,

Thanks also for your comments.    To answer your question, it's funny, because the program right now doesn't believe anything really regarding Jack's suit (or suits).      In other words, the experiments right now are just focusing on "flexible tree matching".    What I mean by that is, when you ask a question, what is really happening is the bot has to match up the "QPT" (question parse tree) with one or more FPTs (fact parse trees).   So it is in the flexibility of doing this matching, that is the demo.

But your comments are great, because when I  "move up the semantic ladder" (as I am doing more and more), i will consider those view points.    That will probably be pretty soon by the way.

So basically right now the bot doesn't know that much, but I want to build all the necessary mechanisms and concepts -- the the concept you brought up about whether the bot believes Jack has one or more suits.

your point about it's response

<Grace> Yes, but I'm not sure if it was the *expensive* one.

leading you to believe that the bot believes that Jack has more than one suit is well taken.

I should probably change that response into a different syntax.

Perhaps:

"Well, you told me he took out his new suit, so if that suit is expensive, then, yes, he took out his new expensive suit"    

this , of course, if you in fact told it the statement "Jack took out his new suit"  prior to asking that.

Or perhaps respond differently ?

Oh . . i love the term " experimental conversationalist"  ..that is exactly what it is at this point !

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #42 on: April 04, 2011, 10:17:28 am »
Oh . . i love the term " experimental conversationalist"  ..that is exactly what it is at this point !


Feel free to use the term as you wish!...No Charge!! ;)

All the best!!
In the world of AI, it's the thought that counts!

*

sunama

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 109
    • ai project
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #43 on: April 16, 2011, 02:36:50 am »
This is impressive stuff.

What programming language have used to program this?

Do you have a website for this project of yours?
www.aiproject.co.uk
Natural Language Processing

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #44 on: April 16, 2011, 12:49:57 pm »

Currently it is about 1/2 C++ and 1/2 Perl.

The semantic tree generation is done in C++ which, by now is exceedingly efficient.    So all possible meaning generation and scoring is the C++ module (clues.cpp).   After the system believes it knows which possible interpretation is the correct one(s), it executes the Perl portion.   I like to prototype in Perl, and then when I know exactly if the proof of concept works, I recode in C++.

 


Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
Attempting Hydraulics
by MagnusWootton (Home Made Robots)
August 19, 2024, 04:03:23 am
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

312 Guests, 0 Users

Most Online Today: 571. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles