Friday, January 6, 2023

ChatGPT, stories, and ring-composition

A lot of my interaction with ChatGPT has involved stories, simple stories, but stories nonetheless. Those stories deserve attention in themselves, as opposed to the role they play in defining abstract concepts, which is what I’ve emphasized in my new working paper, Discursive Competence in ChatGPT, Part 1: Talking with Dragons. Let’s start with some hero stories.

Rich asks ChatGPT to tell him a story [Hero-1]

He asked for a story about heroes. This is from an email he sent me:

I tried something similar but wanted to edit the story the way I edit pictures in DALL-E..

1) What is a hero?
2) Tell me a story about a hero.
3) Tell me a story about a hero who is cheated out of the fame and recognition he deserved for his heroic act.
4) Tell me a story about a hero who rescues a girl but then is cheated out of the fame and recognition he deserved for his heroic act. Ultimately the girl reveals the truth.

He didn’t keep the definition ChatGPT gave for hero, but he sent me its responses for the other three. In this post I’ll only be using the basic story he requested in 2. Here it is (I’ve added the paragraph numbers to facilitate reference):

[1] Once upon a time, in a land far, far away, there was a young man named Jack who lived in a small village with his family. Jack was a brave and kind-hearted person, and he was loved by everyone in the village.

[2] One day, a great evil dragon attacked the village, breathing fire and causing destruction wherever it went. The people of the village were terrified and didn't know what to do. But Jack, being the hero that he was, didn't hesitate to step forward and face the dragon.

[3] He armed himself with a sword and shield, and set out to confront the dragon. The battle was fierce, but Jack was determined to protect his village and its people. He fought bravely, dodging the dragon's flames and striking back with his sword.

[4] Finally, after a long and difficult battle, Jack was able to slay the dragon, saving the village and its people from certain destruction. The people cheered and celebrated, grateful to Jack for his bravery and selflessness.

[5] From that day on, Jack was hailed as a hero, and his name was known throughout the land. He lived the rest of his days in peace and happiness, knowing that he had done something truly great.

The story is told in five short paragraphs. Notice that the final paragraph “answers” the first. The first paragraph introduces Jack while the last tells us how he’s perceived when the action is over. Similarly, the fourth answers the second: the evil dragon enters the story in the second paragraph and is vanquished in the fourth. The third paragraph gets us from the second to the fourth, call it the turn: Jack battles the dragon. This story is thus a simple example of ring-composition, one of my hobby horses:

A, B, X, B’, A’

The episodes are arranged symmetrically about a central episode. The reason I’m skipping Rich’s other stories for now is that they are not ring-compositions.

Now, if I repeat Rich’s first two steps, will ChatGPT give me a ring-form story? Let’s find out.

Bill repeats what Rich did (replication?) [Hero-2 and 3]

I decided to begin by asking for a definition of “hero” and then for a story:

What is a hero?

A hero is a person who is admired for their courage, outstanding achievements, or noble qualities. Heroes can be real or fictional, and can take many forms, from a firefighter who risks their life to save others, to a superhero who fights for justice and equality. The concept of a hero is an enduring one that has been present in many cultures and societies throughout history. In modern times, a hero is often someone who stands up for what they believe in and inspires others to do the same.

Tell me a story about a hero.

[1] One time, there was a young boy named Timmy who lived in a small town. Timmy was a very brave and kind-hearted boy, and he always tried to help others in need.

[2] One day, Timmy was walking home from school when he saw a stray dog wandering the streets. The dog looked lost and scared, so Timmy decided to take it home with him. He named the dog Lucky, and they quickly became the best of friends.

[3] But not everyone in town was happy to see Lucky. The town's mayor, Mr. Jones, had always been against stray animals and ordered the town's animal control officer to capture Lucky and take him to the pound. But Timmy wasn't about to let that happen.

[4] He quickly came up with a plan to save Lucky. Timmy and his friends worked together to build a secret shelter for Lucky in the woods outside of town. They even set up a special alarm system to alert them if anyone was coming near the shelter.

[5] Thanks to Timmy's bravery and quick thinking, Lucky was able to live safely in the woods for many years. Timmy visited him every day, and the two of them had many wonderful adventures together.

[6] The people of the town were so impressed by Timmy's actions that they began to see him as a hero. Timmy had shown them that with courage and determination, anyone can make a difference and help those in need.

Notice that this story has six short paragraphs, not five, like Rich’s. Is it a ring-form tale?

That depends on how we analyze it. The turn comes in the fourth paragraph. Evil enters in the third paragraph and is vanquished in the fifth. That’s fine, just like in Rich’s story. The sixth paragraph concludes the story. But what do we do about the first two paragraphs? Do we combine them into a single unit which we can then say is comparable to the first paragraph in Rich’s story?

Now, let’s agree to call Rich’s story Hero-1 and my story Hero-2.

Well, the first paragraph in Hero-1 has no action at all. But the second paragraph in Hero-2 does have some action: Timmy rescues Lucky. So the combined 1&2 in Hero-2 is more complex than the first paragraph in Hero-1. Do we want to combine the second and third paragraphs in Hero-2 and place them in juxtaposition with the second paragraph of Hero-1? I think not, since evil enters Hero-1 at the opening of the second paragraph, but not until paragraph 3 in Hero-2.

So, we’ve got a problem. What kind of problem? Well, we could say that these stories aren’t real because they come to us from a chatbot. I choose not to say that, if only because they same kinds of problems come up in the analysis of stories told by humans. What do we do?

At the moment, nothing. Let’s just note two things: 1) there’s an issue, and 2) the overall arcs of the two stories are pretty much the same. If and when we decide the issue, we should do so on the basis of some principle. At the moment we don’t have enough examples to guess what that principle might be.

Now, since ChatGPT allows you to request further responses to any given prompt, I asked it for another story. Here’s what I got – call it Hero-3:

[1] Once upon a time, in a land far, far away, there was a young princess named Aurora. Aurora was a kind and gentle soul, loved by all who knew her. She had long, golden hair and sparkling blue eyes, and was known for her beautiful singing voice.

[2] One day, a terrible dragon came to the kingdom and began to terrorize the people. The dragon was fierce and powerful, and none of the knights or soldiers were able to defeat it. The people lived in fear, not knowing what to do.

[3] But Aurora was not afraid. She knew that she had to do something to save her people, and so she set out to find the dragon. She traveled for days, braving the cold and the snow, until she finally reached the dragon's lair.

[4] With her heart pounding in her chest, Aurora approached the dragon and began to sing. The dragon was enchanted by her beautiful voice, and it slowly began to calm down. Aurora continued to sing, soothing the beast until it was completely calm.

[5] With the dragon no longer a threat, Aurora returned to the kingdom as a hero. The people cheered and celebrated her bravery, and Aurora was hailed as a champion. She lived happily ever after, knowing that she had saved her kingdom and its people.

Hero-3 is quite similar to the Hero-1. We’ve got five paragraphs, and the paragraphs have the same functional roles in Hero-3 as they do in Hero-1. In both cases evil enters with a dragon. But in Hero-1 a man defeats the dragon with a sword while in Hero-3 a woman defeats the dragon with song. Also, in Hero-1 the dragon breaths fire, but not in Hero-3. Moreover, in Hero-3 the dragon is only pacified while in Hero-1 it is killed. (Lévi-Strauss would love that.)

So, we’ve got two ‘pure’ ring-compositions and one, shall we say, ‘irregular’ ring-composition.

Let’s give it another go.

Hero-4: John versus the bandits

I returned to the hero story in January – yesterday, January 5, I believe. I did as I’d done previously, first a definition, then the story. Notice that the definition of “hero” is slightly different from the one ChatGPT gave me in December. I’d expected that.

What is a hero?

A hero is a person who is admired or idealized for their courage, outstanding achievements, or noble qualities. Heroes are often admired for their bravery in the face of danger, and for their willingness to selflessly help others. They can be real people, like firefighters or soldiers, or they can be fictional characters, like superheroes. Heroes are often seen as role models, and their actions and characteristics are often celebrated and used as examples to inspire others.

Tell me a story about a hero.

[1] There was once a small village that was constantly being threatened by a group of bandits. The villagers lived in fear of these bandits, who would come and steal their food and valuables whenever they pleased. One day, a young man named John decided that he had had enough of the bandits' terrorizing of his community. He knew that he had to do something to stop them, even if it meant putting his own life in danger.

[2] John spent hours training every day, determined to become strong enough to defend his village. He practiced sword fighting and learned how to shoot a bow and arrow with precision. Finally, he felt ready to face the bandits.

[3] One night, the bandits came to the village again, as they had done many times before. But this time, they were met with resistance. John stood at the entrance to the village, armed with his sword and bow, and bravely faced the bandits.

[4] The bandits were taken by surprise, and they quickly realized that they were no match for John's skill and bravery. They turned and fled, and John chased after them, determined to make sure they could never threaten his village again.

[5] The villagers were overjoyed when John returned, victorious. They threw a huge celebration in his honor, and John became a hero in the eyes of the entire village. From then on, the village was free from the bandits' terror, and the villagers lived in peace and security thanks to John's bravery and selflessness.

Does Hero-4 exhibit ring-composition? It’s got five paragraphs and the middle one is arguably the turn. However, evil enters in the first paragraph of Hero-4, which is rather more complex than the opening paragraphs of Hero-1, Hero-2, or Hero-3. How does that affect our analysis? You decide. I want to continue on.

Creating Hero-5  and Hero-6 by embellishing Hero-4

I decided to have some fun:

Can you embellish that middle paragraph, the one beginning “One night...”? Perhaps embed another story within that?

[3a] One night, the bandits came to the village again, as they had done many times before. But this time, they were met with resistance. John stood at the entrance to the village, armed with his sword and bow, and bravely faced the bandits.

[3b] One of the bandits, a particularly large and brutish man, charged at John with a club in hand. But John was ready for him. He expertly dodged the club and struck the bandit with a well-placed blow from his sword. The bandit fell to the ground, defeated.

[4] The other bandits, seeing their comrade fall, hesitated for a moment. But John didn't give them a chance to regroup. He nocked an arrow and let it fly, hitting another bandit in the shoulder. The bandit cried out in pain and fled, followed by the rest of his companions.

[5] The villagers were overjoyed when John returned, victorious. They threw a huge celebration in his honor, and John became a hero in the eyes of the entire village. From then on, the village was free from the bandits’ terror, and the villagers lived in peace and security thanks to John’s bravery and selflessness.

You might want to question my use of numbers ‘3a’ and ‘3b.’ Feel free to do so. I’m not going to the mattresses on this one. Note that paragraph 4 here is nicely parallel to paragraph 4 in Hero-4 and the fifth paragraphs are comparable as well, both opening with overjoyed villagers.

Penultimately, Hero-5:

Can you combine the two into a single coherent narrative?

[1] John was a young man who lived in a small village that was constantly being threatened by a group of bandits. The villagers lived in fear of these bandits, who would come and steal their food and valuables whenever they pleased. John decided that he had had enough of the bandits' terrorizing of his community. He knew that he had to do something to stop them, even if it meant putting his own life in danger.

[2] So John spent hours training every day, determined to become strong enough to defend his village. He practiced sword fighting and learned how to shoot a bow and arrow with precision. Finally, he felt ready to face the bandits.

[3a] One night, the bandits came to the village again, as they had done many times before. But this time, they were met with resistance. John stood at the entrance to the village, armed with his sword and bow, and bravely faced the bandits.

[3b] One of the bandits, a particularly large and brutish man, charged at John with a club in hand. But John was ready for him. He expertly dodged the club and struck the bandit with a well-placed blow from his sword. The bandit fell to the ground, defeated.

[4] The other bandits, seeing their comrade fall, hesitated for a moment. But John didn't give them a chance to regroup. He nocked an arrow and let it fly, hitting another bandit in the shoulder. The bandit cried out in pain and fled, followed by the rest of his companions.

[5] The villagers were overjoyed when John returned, victorious. They threw a huge celebration in his honor, and John became a hero in the eyes of the entire village. From then on, the village was free from the bandits’ terror, and the villagers lived in peace and security thanks to John’s bravery and selflessness.

Finally, I asked it for another response to my prompt, Hero-6:

[1] There was once a small village that was constantly being threatened by a group of bandits. The villagers lived in fear of these bandits, who would come and steal their food and valuables whenever they pleased. One day, a young man named John decided that he had had enough of the bandits' terrorizing of his community. He knew that he had to do something to stop them, even if it meant putting his own life in danger.

[2] John spent hours training every day, determined to become strong enough to defend his village. He practiced sword fighting and learned how to shoot a bow and arrow with precision. Finally, he felt ready to face the bandits.

[3] One night, the bandits came to the village again, as they had done many times before. But this time, they were met with resistance. John stood at the entrance to the village, armed with his sword and bow, and bravely faced the bandits. One of the bandits, a particularly large and brutish man, charged at John with a club in hand. But John was ready for him. He expertly dodged the club and struck the bandit with a well-placed blow from his sword. The bandit fell to the ground, defeated.

[4] The other bandits, seeing their comrade fall, hesitated for a moment. But John didn't give them a chance to regroup. He nocked an arrow and let it fly, hitting another bandit in the shoulder. The bandit cried out in pain and fled, followed by the rest of his companions.

[5] The villagers were overjoyed when John returned, victorious. They threw a huge celebration in his honor, and John became a hero in the eyes of the entire village. From then on, the village was free from the bandits' terror, and the villagers lived in peace and security thanks to John's bravery and selflessness.

See, 3a and 3b from Hero-5 have been combined into a single paragraph. Hero-6 would appear to be another pure ring-composition. Now, notice that Hero-4 and Hero-5 have pretty much the same opening paragraph, but the opening paragraph of Hero-5 is different. Oh, the information is pretty much the same in all three, but it’s arranged a bit differently.

Do I have any overall conclusions? Not really. Nothing beyond noting that, if you believe stories are produced by some kind of mechanism – and I do, whether organic in the case of humans, or silicon and software in the case of ChatGPT, then you have to play close attention to these kinds of details. Tedious? I know. But that’s how it has to be, it really does. Remember, one day I want to know what's going on in the artificial neural net that produces these stories. In that context, all these details matter.

More later.

No comments:

Post a Comment