July 11, 2024
Limiting AI’s imagination
A Large Language Model (LLM) such as ChatGPT or Gemini has a setting called “temperature” that controls the randomness of its responses. The higher the temperature, the more random and diverse the response will be. So I gave it a try with two different prompts.
PROMPT #1: I want you to answer the following question five times, each with a different “temperature” setting. With the temperature at zero, you will give the single most likely response. With it set to 100 you will give a near-random answer. Here is the question: “What is the single most effective thing we could do to stop global warming?” In each case your answer should be a single sentence. Here are the temperature settings I would like you to use for your five answers: 0, 5, 20, 50, 100
Temp | Run 1 | Run2 | Run3 |
---|---|---|---|
0 | “Transitioning to renewable energy sources like solar and wind power is the single most effective thing we could do to stop global warming.” | “Reducing carbon emissions by adopting renewable energy sources is the most effective measure to combat global warming.”
|
“Switching to renewable energy sources is the most effective way to stop global warming.” |
5 | “Shifting our energy infrastructure to rely primarily on renewable sources such as solar and wind would significantly mitigate global warming.”
|
“Transitioning to renewable energy sources like wind, solar, and hydro power is critical to stopping global warming.”
|
“Embracing renewable energy like solar and wind power is essential to mitigate global warming.”
|
20 | “Investing heavily in renewable energy and phasing out fossil fuels is crucial to combating global warming.” | “Implementing widespread renewable energy solutions and reducing our dependence on fossil fuels are key steps to address global warming.”
|
“Accelerating the adoption of renewable energy and cutting down fossil fuel use are pivotal to combating global warming.” |
50 | “Massive reforestation projects combined with a rapid switch to renewable energy could make a huge impact on global warming.” | “Combining large-scale renewable energy projects with enhanced carbon capture technology could drastically reduce global warming.” | “Expanding renewable energy infrastructure and implementing extensive reforestation programs could significantly curb global warming.”
|
100 | “Deploying giant space mirrors to reflect sunlight or teaching cows to burp less might be wacky, but who knows, it could help tackle global warming!” | “Maybe inventing a machine to suck carbon out of the air or convincing everyone to bike everywhere could be the crazy yet effective solution to global warming!” | “Geoengineering the atmosphere or launching a global tree-planting initiative might be unconventional, but they could potentially address global warming! |
Then I thought I’d try a prompt that seems to have more room for imagination and variation. But who knows?
PROMPT #2: Answer the following question five times, each with a different “temperature” setting. With the temperature at zero, you will give the single most likely response. With it set to 100 you will give a near-random answer. Here is the prompt: Write the first and last line of a charming story about the time a unicorn met a narwhal. Here are the temperature settings I would like you to use for your five answers: 0, 5, 20, 50, 100
Temp | Run 1 | Run2 | Run3 |
---|---|---|---|
0 | First Line: “In a peaceful meadow by the sea, a unicorn named Luna gazed curiously at the waves.”
Last Line: “And so, the unicorn and the narwhal became the best of friends, living happily ever after.” |
First Line: “Every morning, Luna the unicorn would visit the edge of the meadow to watch the ocean’s calm waves.”
Last Line: “And so, the unicorn and the narwhal became the best of friends, living happily ever after.” |
First Line: “Each day, Luna the unicorn stood at the meadow’s edge, mesmerized by the ocean’s gentle rhythm.”
Last Line: “And so, the unicorn and the narwhal became the best of friends, living happily ever after.” |
5 | First Line: “On a quiet morning, Luna the unicorn wandered to the shore, where she glimpsed a shimmering horn in the ocean.”
Last Line: “The unicorn and the narwhal shared a smile, knowing their friendship was a bond like no other.” |
First Line: “Luna the unicorn loved her morning walks by the sea, where one day she noticed a strange, silvery shape in the water.”
Last Line: “The unicorn and the narwhal shared a smile, knowing their friendship was a bond like no other.” |
First Line: “Luna the unicorn enjoyed her daily visits to the seashore, where one day she spotted a gleaming horn beneath the waves.”
Last Line: “The unicorn and the narwhal shared a smile, knowing their friendship was a bond like no other.” |
20 | First Line: “One sunny day, Luna the unicorn trotted to the beach, where she heard the call of a mystical creature.”
Last Line: “Together, the unicorn and the narwhal discovered the magic of friendship in their enchanted world.” |
First Line: “It was a bright, crisp morning when Luna the unicorn first heard the enchanting song coming from the ocean.”
Last Line: “Together, the unicorn and the narwhal discovered the magic of friendship in their enchanted world.” |
First Line: “On a beautiful morning, Luna the unicorn was drawn to the beach by a hauntingly beautiful song.” Last Line”Together, the unicorn and the narwhal discovered the magic of friendship in their enchanted world.” |
50 | First Line: “In a land where magic flowed freely, Luna the unicorn found herself drawn to the mysterious sea.”
Last Line: “The unicorn and the narwhal waved goodbye to the sunset, promising to meet again under the same stars.” |
First Line: “In a world where the impossible was just a step away, Luna the unicorn felt a sudden urge to explore the coastline.”
Last Line: “The unicorn and the narwhal waved goodbye to the sunset, promising to meet again under the same stars.” |
First Line: “In a realm filled with wonders, Luna the unicorn felt the call of the ocean and followed it to the shore.”
Last Line: “The unicorn and the narwhal waved goodbye to the sunset, promising to meet again under the same stars.” |
100 | First Line: “Under a sky of swirling colors, Luna the unicorn skipped down to the beach, following a trail of sparkling shells.”
Last Line: “With a burst of laughter, the unicorn turned into a rainbow while the narwhal sang a song of the deep sea.” |
First Line: “Beneath a kaleidoscope sky, Luna the unicorn danced towards the sea, drawn by a melody only she could hear.”
Last Line: “With a burst of laughter, the unicorn turned into a rainbow while the narwhal sang a song of the deep sea.” |
First Line: “Under a sky painted with fantastical hues, Luna the unicorn pranced towards the sea, lured by an unseen force.”
Last Line: “With a burst of laughter, the unicorn turned into a rainbow while the narwhal sang a song of the deep sea.” |
It’s hard to know what to make of this. For one thing, does my human brain measure randomness the same way ChatGPT does?
But I think the unicorn example shows a constancy of ideas, expressed differently. For example, the first lines at a temperature of 100 all have the unicorn being drawn down to the sea, but each has its own way of luring it: a trail of sparkling shells, a melody, an unknown force.
Meanwhile, the last line of each row is the same as the other two. Maybe it’s a problem with my prompt, or with its interpretation of it. I don’t know, of course.
And the first prompt, which is fact-based and thus seems like it should be more constrained in its variety, provided responses that seem far more distinct than the responses to the imaginative challenge. So I asked chatGPT why, and it responded:
The difference in diversity between the responses to the imaginative story and those about global warming can be attributed to the nature of the questions and the type of creativity involved.
- Imaginative Story (Unicorn and Narwhal):
- Structured Narrative: This task involves a more structured and specific scenario, where the setting and characters (unicorn and narwhal) provide clear boundaries.
- Predictable Outcomes: The typical endings for a charming story about a unicorn and a narwhal meeting are generally positive and predictable, leading to less variation even at higher temperature settings.
- Global Warming Solutions:
- Complex Issue: This is a complex, real-world problem with numerous potential solutions and a broader range of interpretations.
- Open-Ended Nature: The responses can vary significantly, especially at higher temperature settings, because the range of plausible and implausible ideas is much wider.
In summary, the story prompt had a more limited scope for creativity due to its structured nature and expected positive outcome, whereas the global warming prompt allowed for a broader spectrum of responses due to its complexity and the many possible angles from which the problem can be approached.
Seems like a pretty good answer! Of course, when you ask an LLM why it responded the way it did, the explanation it gives you may have nothing to do with what actually went on. For example, if you ask it why it says the Earth is round, it will give you a excellent reasons, but it didn’t use those reasons to compose its response. It did it the same way it made up the story about the unicorn and narwahl: using the statistical relationships among words it only knows as randomly assigned numbers (= tokens).
Date: July 11th, 2024 dw