The Examples Page
This page
contains several examples that show how Corby can be trained to understand what
people say. The basic mechanisms of the Corby learning process are explained in
the Learning page
of the Operation Manual. If you have not done so before, this is a good
opportunity to read it.
The Corby
architecture is based on a stimulus-response model. Then, the basic learning
model in Corby consists of two paragraphs: One of them is the stimulus and the
other is the appropriate response to that stimulus. When you submit a
stimulus-response pair for learning, Corby is able to immediately capture the
stimulus-response relationship and then repeat the response each time it
receives the same stimulus. But it is able to go beyond that, by discovering
certain relationships between several stimulus-response pairs submitted for
learning.
The most
important knowledge element in the Corby architecture is the concept. A concept
is a compact representation of a set of similar ideas, which constitute the
instances of the concept. This is what enables it to show understanding what
people say. Just like we humans do, Corby can, of course, repeat, parrot like,
what it learns, but it is the ability to form concepts and use them effectively
that sets it apart from the rest.
Corby
captures a concept by being exposed to several instances of the concept. Then,
by discovering certain types of relationships between the knowledge elements
used in the instances, Corby is able to form a knowledge element that is an
abstract representation of all the instances. This, hopefully, will also cover
other instances that are not present in the training set, enabling it to answer
questions for which it has not been specifically trained.
In the
process of learning a set of concepts, it is important that we have a set of
instances of the concepts that are not included in the training set. This is
called the test set; it provides us with a tool to check Corby’s progress while
being submitted repeatedly to the training set. As soon as Corby responds
correctly to all the questions in the test set, the training process for the
set of concepts is complete.
Of course
it is crucial to the whole process that you never tell Corby directly the
response to any question in the test set. If you do so, Corby will pick up
immediately the correct response and you will be deprived of a tool to check
when Corby captures the concept. If you inadvertently do that, all is not lost,
you just find another question for the test set that deals with the same
concept.
It can
happen that, without you knowing it, Corby has already in its knowledge base a
response for one of the questions in the test set. For this reason, you should
always start a training session by checking all the questions in the test set.
If Corby answers correctly to one of them you then must find another question
involving the same concept. If, after several tries, you are not able to find
such a question, it means that Corby has already captured the concept.
You should
not forget that, although all examples in this page are in English, you can use
the language of your choice to replicate them. Corby’s processing is completely
independent of the language you use.
This
page includes the following sections:
Telling tales includes
an example of a test set.
Learning matters
describes how to train Corby to acquire concepts.
This
section contains an example of a test set. It consists of a short story,
followed by a set of questions about that story. When Corby is able to answer
correctly to all the questions without explicitly being told the correct
answers, it means that Corby managed to capture all the concepts involved. At
that time, Corby will behave as if it understands this story and similar ones
that deal with the same concepts.
In the eighties we lived in Queens, in a street full of sunshine. I distinctly remember the girl who lived next door. Her name was Billy Jean and she would dance, on the floor, all night long. In the hot summer of 85, our friend Michael Johnson came to visit with us. He got to meet Billy Jean and she turned his head inside out. At the end, he would only be able to mumble: Billy Jean is not my lover and the kid is not my son.
…
Where
did we live in the eighties?
in Queens
What was our
street like?
full of
sunshine
Who lived next
door?
a girl
What was her
name?
Billy Jean
What would she
do?
she would
dance, on the floor, all night long
Who is Michael
Johnson?
your friend
When did
he come to visit with us?
in the hot
summer of 85
What did Billy
Jean do to him?
she turned his
head inside out
What would he
mumble?
Billy Jean is
not my lover and the kid is not my son
It is
impossible to provide a list of precise instructions that would lead to Corby
understanding all the concepts in the test set presented in the previous
section. Concepts form a hierarchy where complex concepts are constructed from
simpler ones. Therefore, the steps needed are very much dependent on the
maturity level of the knowledge base used.
To make
Corby learn concepts you always follow the same “variations on a theme”
principle: You supply a set of examples that represent the same pattern but
with variations that turn them into instances of the same concept. Then you
repeatedly submit the examples until Corby is able to answer correctly.
For
instance, you can provide one or more statements with some information and then
ask some questions about the initial statement, correcting the responses given
as appropriate. You repeat this several times to allow the internal structures
to properly evolve into their definitive form. It is important to vary the
order in which the questions are asked. As soon as Corby is able to answer
correctly to all the questions, then you try the test set. If Corby manages to
answer correctly all the answers in that, then it managed to successfully
capture the concepts involved.
You can
approach the problem as a whole, trying to capture several concepts at the same
time. For example, an element of the training set for the test set presented in
the previous section could be:
In the
seventies we lived in Houston, in a street full of trees. I distinctly remember
the man who lived next door. His name was Watson Aname and he would read books,
all night long. In the hot summer of 75, our friend Mary Jane came to visit
with us. She got to meet Watson Aname and he made her a true believer. At the
end, she would only be able to mumble: Needle bubble toil and trouble.
Sometimes
it is not easy to deal with the whole problem at once and then we approach it
piecemeal. We then isolate each concept and deal with that in a separate way.
For the reasons exposed above, you should always start with the basic concepts.
It is
relatively easy for Corby to pick up a concept when this involves only a
stimulus and its response. In this case you supply several instances of the
concept and their respective responses and Corby will be able to acquire the
concept after a few attempts.
Another
matter altogether is the case where the concept involves some information
already stored in the knowledge base. For instance, to capture the “X said Y”
concept, we could use the following example. We start by loading the knowledge
base with the information we want to retrieve:
Youhd Grand
said: We should always have faith in divine intervention
…
Bad
Pritt said: When I grow up I want to be an astronaut. I want to go to Venus
…
Venus
Willys said: The next time I see that Sharapiovra girl again I will smack her
cute little nose
…
George Shrub said: You sun of duh beach
you give me duh peace i give you duh sheep
…
The
training set for this example would contain, for instance:
What did Youhd
Grand say?
We should always have faith in divine intervention
What did Bad Pritt say?
When
I grow up I want to be an astronaut. I want to go to Venus
What
did Venus Willys say?
The
next time I see that Sharapiovra girl again I will smack her cute little nose
The test
set for the above training set could be, for instance:
What did George Shrub say?
You sun of duh beach you give me duh
peace i give you duh sheep
The answers
in this example could have the more elaborate form “She said…” or “He said…”
but for that Corby must be able to understand the concepts of male/female name.
This is a good example of a complex concept that includes simpler ones.
Incidentally,
making Corby understand the concepts of male/female name is not an easy task,
because there are not clear rules about it. Even we humans have difficulty
sometimes and we use tricks like pre-pending Mr, Mrs or Miss to human names to
deal with that problem. Using that trick it would be also easier for Corby.
For the
preceding example to work, Corby must be able to reduce the sentences that
carry the information to retrieve to the form “X said: Y” where X and Y are
single elements – either they are a single word or a concept that aggregates
all the words, which in turn may be made of other concepts. This, of course,
depends on the maturity of the Knowledge Base that you use for the example.
If, using
your Knowledge Base, Corby is not able to capture the concept in the preceding
example, but still you want to see Corby capturing the concept, try the
following example on an empty Knowledge Base.
First load
the information to retrieve:
John said: somethingorother
…
Mary said:
nothingatall
…
Bill said:
dontbotherme
…
Steve said:
scarlatpimpinel
…
Dick said:
itsaliveitsalive
… [clear
the context with Ctl+N]
Then
the questions in the training set:
what did John say?
somethingorother [correct
as appropriate]
… [force autolearn]
[clear
the context with Ctl+N]
what did Mary say?
nothingatall [correct
as appropriate]
… [force autolearn]
[clear
the context with Ctl+N]
what did Bill say?
dontbotherme [correct
as appropriate]
… [force autolearn]
[clear
the context with Ctl+N]
And
finally the questions in the test set:
what did Steve say?
scarlatpimpinel
what did Dick say?
itsaliveitsalive
As you can
see, to be able to learn complex concepts, Corby must learn first simpler ones.
This is the reason why we do not teach Quantum Mechanics concepts to small
children - It will not work. We must build complex concepts from the ground up.
Another
basic concept is “X is Y”. To capture this concept we could use the training
set:
Will Klingdon
is the king of the Nile
Tex
Burdon is the president of the Banana Republic
Mary
Lamb is the queen of Sheba
The test
set could be something like:
Smart Dalek is the king of Patagonia
These basic
concepts, besides being useful as building blocks of other, more elaborate
concepts, they are useful by themselves because they are able to pull huge
amounts of information from the world model. An example of such a concept is
the X is Y concept when coupled with questions like “What is X?” or “Who is
X?”.
If you ever
find yourself at a loss regarding what concept you should teach next, try to
remember the concepts that we teach to small children. Or you can ask someone
who has experience in the matter.
When Corby
fails to capture a concept using some training set, there is no way other that
to get a new training set, preferably as different as possible from the
preceding ones. In that situation, you should check if you are not using in the
training set complex concepts that Corby has not learned yet.
Even if
Corby fails to capture a concept, it will make full use of the information that
you provide in the training sets. This is similar to what occurs in humans: Even
if we do not fully understand something, we can still make good use of it. Of
course, the full potential of an intelligent entity is not realised until it
captures the concepts behind the elements that it manipulates.
When trying
to teach it something, you should not forget that Corby needs, in many
instances, to establish relationships between a given response and the relevant
elements of the context. If you feel that Corby is failing to capture some
concept, make sure that the relevant information is still in the context.
If you
decide to become a serious user of Corby, you should keep track of the concepts
that your knowledge base has already acquired. This is the only true way of
comparing the quality of two knowledge bases. We could even devise a classification
system whereby we would define grades and assign to each grade a set of
concepts. Then we would say about a given knowledge base that it reached grade
X.
Finally, a
word regarding the similarity between the way Corby learns and the way humans do.
When we think about what we do everyday in schools around the world, we must
conclude that it is strikingly similar to the way we used to train Corby in the
examples above. In schools we provide students with several instances of a
concept and allow them to make experiments that themselves generate more
instances. Then we submit students to tests involving instances of the concept
that they have not seen during training. If they pass the test, they
demonstrate that they have acquired the concept, because they were able to deal
with any new instance of it.
Comments and suggestions about this page are welcome and should be sent
to fadevelop@clix.pt
Rev 1.0 - This page was last modified
2005-07-14 - Copyright © 2004-2005 A.C.Esteves