🦜 Chapter 6

Parrot - The Story Weaver

GPT and Word-by-Word Creation

Polly's Turn to Shine

"Alright, alright," said Polly the Parrot, fluffing her colorful feathers. "Owl is great at UNDERSTANDING. But I am the master of CREATION!"

"What do you mean?" asked the animals.

"Let me show you!" Polly declared.


The Fundamental Difference

Polly drew two diagrams in the dirt:

πŸ¦‰ OWL (BERT):

Task: Understand this β†’ "The ___ jumped over the moon"

Process: Look at "jumped" and "moon"

Analyze what makes sense

Result: Understands it should be "cow"

BUT: Owl just finds the answer - doesn't CREATE anything new!


🦜 PARROT (GPT):

Task: Continue this β†’ "Once upon a time, there was a"

Process: Based on everything I've read...

Predict what comes next

Result: I CREATE: "...brave little dragon who lived in a mountain cave."

I don't just understand - I GENERATE new text!

"You see," Polly explained, "Owl ANALYZES. I CREATE!"


How Parrot Creates: One Word at a Time

"Let me show you exactly how I write stories," said Polly.

"I generate text ONE WORD AT A TIME, from left to right!"

CHALLENGE: Write a story starting with "The cat"

🦜 MY PROCESS:

STEP 1: I have "The cat"

I think: "What word usually comes after 'The cat'?"

Based on millions of stories I've read:

I choose: "sat" (most likely)

NOW I have: "The cat sat"

STEP 2: I have "The cat sat"

I think: "What comes after 'The cat sat'?"

Options:

I choose: "on"

NOW I have: "The cat sat on"

STEP 3: I have "The cat sat on"

I think: "What comes after 'The cat sat on'?"

Options:

I choose: "the"

NOW I have: "The cat sat on the"

STEP 4: I have "The cat sat on the"

I think: "What comes next?"

Options:

I choose: "mat"

FINAL: "The cat sat on the mat"

"Each word I choose becomes part of the context for choosing the NEXT word!" Polly explained.


🎨 Try This Activity!

Let's play Parrot's word prediction game!

I'll give you the start of a sentence. You predict what comes next:

1. "The sun rises in the ___"

What word comes next? (east!)

2. "Once upon a ___"

What word comes next? (time!)

3. "Happy birthday to ___"

What word comes next? (you!)

4. "I scream, you scream, we all scream for ___"

What word comes next? (ice cream!)

You were predicting like Parrot! This is how Parrot generates text!


The One-Direction Rule

"But Polly," said Ella, "why don't you read both ways like Owl?"

"Ah," said Polly, "that's a KEY difference!"

πŸ¦‰ OWL can do this:

"The animal didn't cross the street because IT ___ too tired."

↑ Look both ways to understand "IT"

🦜 PARROT can only do this:

"Once upon a time, there was a ___"

↑ Only look LEFT (at what came before)

Can't look RIGHT (at what comes after)

Because what comes after doesn't exist yet! I'm creating it!

"When you're CREATING," Polly explained, "you can't look into the future! You can only use what you've written so far!"


⏸️ Pause & Think!

This makes sense, right?

When YOU write a story:

That's exactly how Parrot works!


Parrot's Training: Learning from Billions of Texts

"How did you learn to predict words so well?" asked Monty.

"I read BILLIONS of sentences!" Polly said proudly.

PARROT'S TRAINING:

I read books, websites, articles, stories - everything!

For each sentence, I practiced:

Example 1:

Text: "The dog chased the cat"

My training:

Example 2:

Text: "I love eating pizza"

My training:

I did this BILLIONS of times!

Now I know:


Watching Parrot Create a Story

The Ancient Tree challenged: "Create a story about a brave mouse."

Everyone watched as Polly began:

🦜 PARROT'S CREATION PROCESS:

GIVEN: "Write a story about a brave mouse."

STEP 1: "Once"

Why? Stories often start with "Once"

Confidence: 85%

STEP 2: "Once upon"

Why? "upon" commonly follows "Once" in stories

Confidence: 90%

STEP 3: "Once upon a"

Why? Classic story opening pattern

Confidence: 95%

STEP 4: "Once upon a time"

Why? This is the most common story opening!

Confidence: 98%

STEP 5: "Once upon a time, there"

Why? Natural continuation

Confidence: 75%

STEP 6: "Once upon a time, there lived"

Why? "lived" fits story style

Confidence: 80%

STEP 7: "Once upon a time, there lived a"

Why? Introducing a character

Confidence: 90%

STEP 8: "Once upon a time, there lived a brave"

Why? The prompt said "brave mouse"!

Confidence: 95%

STEP 9: "Once upon a time, there lived a brave little"

Why? "little" describes mice well

Confidence: 70%

STEP 10: "Once upon a time, there lived a brave little mouse"

Why? That's our main character!

Confidence: 99%

STEP 11: "Once upon a time, there lived a brave little mouse named"

Why? Characters usually have names

Confidence: 85%

STEP 12: "Once upon a time, there lived a brave little mouse named Timothy"

Why? Timothy sounds like a good mouse name

Confidence: 60%

CONTINUING...

STEP 20: "Once upon a time, there lived a brave little mouse named Timothy.

He lived in a cozy hole beneath an old oak tree."

STEP 35: "Once upon a time, there lived a brave little mouse named Timothy.

He lived in a cozy hole beneath an old oak tree. One day, he heard a cry

for help coming from the forest."

The story continues growing, word by word!


🎨 Try This Activity!

Let's write a story together, Parrot-style!

Start: "The dragon" Your turn! What word comes next?

Let's say you choose: "flew"

Now: "The dragon flew" Next word?

You choose: "over"

Now: "The dragon flew over" Next?

Keep going! You're creating like Parrot!


The Temperature Control

"But wait," said Ella, "don't you sometimes make MISTAKES or say weird things?"

"Ah," said Polly, "that depends on my TEMPERATURE setting!"

TEMPERATURE = How creative/random I am

🌑️ LOW TEMPERATURE (0.1 - 0.3):

Very predictable, safe choices

"The cat sat on the mat. The dog ran in the yard."

BORING but ACCURATE! βœ“

🌑️ MEDIUM TEMPERATURE (0.7):

Balanced, natural

"The cat lounged on the soft mat, purring contentedly."

GOOD BALANCE! βœ“

🌑️ HIGH TEMPERATURE (1.5+):

Very creative, sometimes weird!

"The cat philosophically contemplated the existential mat beneath its fuzzy paws."

CREATIVE but RISKY! ⚠️

"Humans can adjust my temperature to get different styles!" Polly explained.


⏸️ Pause & Think!

When would you want different temperatures?

Low temperature:

Parrot's Amazing Abilities

What Parrot can do:

1. Continue Any Text

You write: "The best thing about summer is"

🦜 Parrot: "...spending time at the beach, eating ice cream,

and enjoying the warm sunshine with friends and family."

2. Answer Questions Conversationally

You ask: "Why is the sky blue?"

🦜 Parrot: "The sky appears blue because of a phenomenon called

Rayleigh scattering. When sunlight enters Earth's atmosphere,

it collides with air molecules. Blue light has a shorter wavelength,

so it scatters more than other colors, making the sky look blue!"

3. Write in Different Styles

Topic: "A cat chasing a mouse"

Style 1 (Simple): "The cat chased the mouse. The mouse ran away fast."

Style 2 (Dramatic): "With lightning speed, the feline predator lunged

toward its tiny prey, who desperately scurried for safety!"

Style 3 (Poetic): "On silent paws the hunter glides, while tiny feet

in terror race, through shadowed halls their chase abides, fear and

instinct interlace."

4. Have Conversations (ChatGPT!)

You: "Hello! How are you?"

🦜: "I'm doing well, thank you for asking! How can I help you today?"

You: "Can you explain photosynthesis?"

🦜: "Of course! Photosynthesis is the process plants use to convert

sunlight into energy. They take in carbon dioxide and water, and using

the energy from sunlight, they produce glucose (sugar) and oxygen..."

You: "That's cool! Can trees do it at night?"

🦜: "Great question! No, trees can't do photosynthesis at night because

they need sunlight. However, they do continue to respire (breathe)

at night, taking in oxygen and releasing carbon dioxide, just like we do!"


Parrot's Limitations

"But remember," said Polly honestly, "I have WEAKNESSES too!"

❌ WEAKNESS 1: I can't look ahead

If you ask: "The animal didn't cross the street because IT was too tired"

I might struggle to know "IT" refers to the animal, because I can't look

at "too tired" until I get there!

❌ WEAKNESS 2: I might "hallucinate" (make up facts)

If you ask: "What's the capital of Exampleland?"

I might CREATE an answer even if Exampleland doesn't exist!

Why? Because I'm trained to generate, not to verify truth!

❌ WEAKNESS 3: I can lose track in VERY long texts

After thousands of words, I might forget details from the beginning

(Though newer versions of me are getting better at this!)

❌ WEAKNESS 4: I sometimes continue patterns blindly

If you start: "1, 2, 3, 4..."

I'll continue: "5, 6, 7, 8..." even if you wanted something else!


🦜 Parrot's Stat Card

REAL NAME: GPT (Generative Pre-trained Transformer) INVENTED: 2018 by OpenAI

The Great Debate: Owl vs. Parrot

The animals watched as Owl and Parrot faced each other.

"I'm better!" said Owl. "I UNDERSTAND deeply!"

"I'm better!" said Parrot. "I CREATE beautifully!"

Professor Encoder stepped between them.

"You're BOTH right! You're DIFFERENT tools for DIFFERENT jobs!"

COMPARISON:

πŸ¦‰ OWL (BERT):

🦜 PARROT (GPT):

BOTH use Lion's Transformer architecture!

BOTH are children of Lion!

BOTH are revolutionary!

But DIFFERENT purposes!


🎨 Try This Activity!

Decide: Would you use Owl or Parrot?

1. Task: "Find information in a long article"

Answer: Owl! (Understanding)

2. Task: "Write a birthday poem"

Answer: Parrot! (Creation)

3. Task: "Is this email spam or not?"

Answer: Owl! (Classification/Understanding)

4. Task: "Help me continue writing my essay"

Answer: Parrot! (Generation)

5. Task: "What's the main idea of this book chapter?"

Answer: Owl! (Comprehension)


Together They're Powerful!

"Actually," said Professor Encoder, "modern AI systems sometimes use BOTH!"

EXAMPLE: A Smart Assistant

You ask: "What's the weather in the article I sent you, and write me a

reminder about it?"

STEP 1: Use OWL to UNDERSTAND the article

β†’ Owl reads and comprehends: "The article says it will rain tomorrow"

STEP 2: Use PARROT to CREATE the reminder

β†’ Parrot writes: "Reminder: Don't forget your umbrella tomorrow!

The forecast shows rain."

BOTH working together! βœ“

βœ… Challenge 4 COMPLETE!

The Ancient Tree glowed: "Well done! You've learned about UNDERSTANDING and CREATION!"


Continue to Chapter 7 with Giraffe...