Goldilocks from ChatGPT

- Posted in Uncategorized by

Here's a sample from ChatGPT:

Goldilocks was a girl.
She walked in the woods.
She found a house.
The house had three bears.
The bears lived in the house.
The bears woke up.
They made porridge.
Papa Bear's porridge was too hot.
Mama Bear's porridge was too hot.
Baby Bear's porridge was just right.
Goldilocks went to the kitchen.
Goldilocks tasted Papa Bear's porridge.
Goldilocks tasted Mama Bear's porridge.
Goldilocks tasted Baby Bear's porridge.
Baby Bear's porridge was just right.
Goldilocks ate Baby Bear's porridge.
Goldilocks went to the living room.
Goldilocks sat in Papa Bear's chair.
The chair was too hard.
Goldilocks sat in Mama Bear's chair.
The chair was too soft.
Goldilocks sat in Baby Bear's chair.
The chair was just right.
The chair broke.
Goldilocks went to the bedrooms.
Goldilocks lay in Papa Bear's bed.
Papa Bear's bed was too hard.
Goldilocks lay in Mama Bear's bed.
Mama Bear's bed was too soft.
Goldilocks lay in Baby Bear's bed.
Baby Bear's bed was just right.
Goldilocks fell asleep.
The bears came home.
Papa Bear said, "Someone has eaten my porridge."
Mama Bear said, "Someone has eaten my porridge."
Baby Bear said, "Someone has eaten my porridge."
They saw the bowls were empty.
They saw the chairs were moved.
Baby Bear saw his chair was broken.
Papa Bear saw his porridge was eaten.
Mama Bear saw her porridge was eaten.
They found Goldilocks in Baby Bear's bed.
Goldilocks woke up.
She ran away.

ChatGPT's output will vary. After cleaning up the line feeds and such, the problems I would have with this block include:

"Goldilocks was a girl": Brainhat won't parse this correctly. It can parse "A girl's name is Goldilocks", however. I can approch it one of two ways--with a rewrite rule or new grammar. In either case, I'd need to recognize that "Goldilocks" is not in the vocabulary. That would differentiate the statement from something like "the pitcher was a girl."

"The house had three bears": Literally, this is an odd statement. Inference needs to fix it.

Use of the plural as in "The bears woke up" and "They made porridge" might be wonky.

"Papa Bear's porridge was too hot": we've never been introduced to "Papa Bear" as a formal title. To Brainhat, this will appear as two nouns, side-by-side. Something like "the big bear's name is papa bear" would take care of it.

Introducing these problems/process to readers, I could show why manual rewrites are needed, and what they should be. I think that will get me there faster. Otherwise I am diving back into development.

Anyway, whatever page I create for this translation, it should aid in making it on a line-by-line basis.

See also: https://www.brainhat.com/blog/gabriela-goes-chatgpt-and-back.html

Sending stuff to ChatGPT

- Posted in Uncategorized by

So, as I wasn't saying, it seems to me that a good first marriage of Brainhat and ChatGPT would be for ChatGPT to simplify input for Brainhat to use and then for ChatGPT to make a summary of the context when needed. This could have a page associated with it. I'm not doing any server-side storage (or local storage for that matter). I don't know where the integration will occur, but setting up another web page should be interesting enough.

The next integration will be to use ChatGPT to disambiguate input, to provide answers to otherwise unanswered questions and to support goal-seeking processing.

But, first, another web page. It will have a window where the user can post some text for translation into Brainhat language (another window). Maybe if you post in the ChatGPT window you get the Brainhat version in the other window and vice versa. Or maybe there could be a "send to ChatGPT" button for the context or a "Send to Brainhat" for the ChatGPT translation. We'll see.

See: https://www.brainhat.com/blog/gabriela-goes-chatgpt-and-back.html

ChatGPT and back

- Posted in Uncategorized by

Here's an experiment. read in part of Gabriela. Then, I fed the first twenty lines of the context to ChatGPT, like so:

"Summarize the following, taking the sentences in reverse order: You
plan You do make your pretty family.  You plan You do marry You. You
plan You do go to europe. You plan You do go to hawaii. You plan You
do make money. You plan You do work. You plan You do finish your
major. You plan You do study your major. You plan You do return to
mexico. You plan You do learns english. You have You do plan. You like
your pretty dog belonging to You. You like a college will be perfect
for You. You may be with hugo. You may be with your pretty family. You
believe a college will be perfect for You. a college is described. You
are from tapachula. You want You to study your major."

This is what came back:

Here’s a clear, simple summary of your passage — with the ideas
arranged in **reverse order** (starting from the last sentence and
moving backward):

You want to study your major and come from Tapachula.  You believe
college will be perfect for you and that you may be with Hugo and your
pretty family.  You like your pretty dog and think college will suit
you well.  You have plans — to learn English, return to Mexico, study
and finish your major, work, make money, travel to Hawaii and Europe,
get married, and build a beautiful family.

Now, I ask ChatGPT to turn the block of text above into simple sentences so that I can feed it back to Brainhat:

Using only words that you find in the following text, convert the text
into very simple sentences with one idea expressed per sentence: You
want to study your major and come from Tapachula.  You believe college
will be perfect for you and that you may be with Hugo and your pretty
family.  You like your pretty dog and think college will suit you
well.  You have plans — to learn English, return to Mexico, study and
finish your major, work, make money, travel to Hawaii and Europe, get
married, and build a beautiful family.

Here is what ChatGPT gave back to me:

Here is the text rewritten in **very simple sentences**, each with one clear idea, using **only the words from the original text**:

1. You come from Tapachula.
2. You want to study your major.
3. You believe college will be perfect for you.
4. You may be with Hugo.
5. You may be with your pretty family.
6. You like your pretty dog.
7. College will suit you well.
8. You have plans.
9. You learn English.
10. You return to Mexico.
11. You study your major.
12. You finish your major.
13. You work.
14. You make money.
15. You travel to Hawaii.
16. You travel to Europe.
17. You get married.
18. You build a beautiful family.

Now, I will feed this back to a fresh instance of Brainhat and see what we get. I will shut off creditspkr so I don't get "You say..." for each line. I didn't include the two lines with the asterisks. Will explain, below.

You come from Tapachula.
You want to study your major.
You believe college will be perfect for you.
* You may be with Hugo.
* You may be with your pretty family.
You like your pretty dog.
College will suit you well.
You have plans.
You learn English.
You return to Mexico.
You study your major.
You finish your major.
You work.
You make money.
You travel to Hawaii.
You travel to Europe.
You get married.
You build a beautiful family.

Here is the context:

debug> xspeak 1
I make a pretty family. I get married. I travel to europe. I travel to
hawaii. I make money. I work. I finish my major. I study my major. I
return to mexico. I learn english. I have I do plan. I like my pretty
dog. I believe college will be perfect for I. I want I to study my
major. I come from thing.

"I come from thing" (instead of Tapachula) is because the fresh copy of Brainhat does not know 'Tapachula.' It was originally introduced in gabriela.txt like so:

"I am from a city.
The city's name is Tapachula."

I also had to comment out "You may be with Hugo" and "You may be with your pretty family" because there is an old ponder routine that sees something in an imperfect future tense and tries to be clever and ask it as a question. I haven't depended on that for many years--will likely disable it.

ANYWAY! We took a round trip from 1) input to Brainhat to create a content to 2) feeding statements from the context to ChatGPT to create a fluid summary of the context to, 3) asking ChatGPT to re-express its own summary in simple statement to, 4) feeding the output of ChatGPT back to Brainhat as input. With the exceptions noted above, we essentially got back the same context we started with. Cool.