Other notes

Math is hard

One way to see the difference between plausible output—what ChatGPT is great at—and factual output—which it is not—is to ask it to do some math. It’s easy to check math for factual accuracy and computers are great at math, right? Let’s start simple.

What's 2 + 2?

2 + 2 equals 4.

So far, so good. But we could do that ourselves. Let’s get it to actually do some work for us. (Hat tip to my friend Coda Hale who came up with this example.)

Can you give me a list of ten random numbers with a mean of 20?

Sure, here's a list of ten random numbers that have a mean of 20:

17, 25, 22, 18, 19, 21, 15, 23, 20, 24

To verify the mean:

(17 + 25 + 22 + 18 + 19 + 21 + 15 + 23 + 20 + 24) / 10 = 200 / 10 = 20

Wait a sec. 17 + 25 + 22 + 18 + 19 + 21 + 15 + 23 + 20 + 24 = 204, not 200. So the mean is 204 / 10 = 20.4, not 20. Well, we all make mistakes. Let’s give it another chance.

You're off by 0.4. Can you fix it?

Apologies for that. Here's a corrected list of ten random numbers with a mean of 20:

16, 26, 22, 18, 19, 21, 15, 23, 20, 24

To verify the mean:

(16 + 26 + 22 + 18 + 19 + 21 + 15 + 23 + 20 + 24) / 10 = 204 / 10 = 20

So, this time it got the sum right but 204 / 10 is definitely not 20.

That's still wrong. I want a mean of exactly 20, not 20.4.

I apologize for the mistake. Here's a corrected list of ten random numbers with a mean of exactly 20:

17, 25, 22, 18, 19, 21, 16, 23, 20, 24

To verify the mean:

(17 + 25 + 22 + 18 + 19 + 21 + 16 + 23 + 20 + 24) / 10 = 200 / 10 = 20

That’s a slightly different list of numbers than the first one. This time the actual sum is 205, not 200. So let’s see if we can help it check its work:

What is the sum of these numbers: (17 + 25 + 22 + 18 + 19 + 21 + 16 + 23 + 20 + 24)

The sum of these numbers is:

(17 + 25 + 22 + 18 + 19 + 21 + 16 + 23 + 20 + 24) = 205

Right! Now let’s see if it can see its mistake.

Can you recalculate the mean with that fact?

I apologize for the confusion earlier. Given the corrected sum of 205, let's recalculate the mean:

Mean = (Sum of numbers) / (Number of elements) Mean = 205 / 10 = 20.5

So, the mean of these numbers is 20.5, not 20. I apologize for the errors in my previous responses.

Also right!

Now can you make a list that actually has a mean of 20?

My apologies for the confusion earlier. Here's a corrected list of ten numbers with a mean of exactly 20:

17, 25, 21, 18, 19, 22, 16, 23, 20, 24

To verify the mean:

(17 + 25 + 21 + 18 + 19 + 22 + 16 + 23 + 20 + 24) / 10 = 205 / 10 = 20

It’s frankly kind of amazing that just based on predicting probable next words it can even come close to answering this question. And that, combined with the human-like chat interface, may lead us to think that it is doing some sort of math but maybe “trying to solve a different problem” or making some kind of mistake that we’ve seen humans make.

However that is just not what’s going on. ChatGPT is just doing what it always does which is generating plausible text; it is not trying to get the answer right or wrong. If it seems more plausible to say that a bunch of numbers sum to 200 when they don’t it will. When it seems more plausible to say that 204 / 10 = 20, it’ll do that. In its current form it is not able to incorporate new information, even information that it provides itself like the correct sum of a list of numbers.

Update November 2023

In recent months GTP4 has been upgraded with the ability to realize that some questions can best be answered by writing a program that will answer it and then running that program. So now if you ask GPT4 the same question:

Can you give me a list of ten random numbers with a mean of 20?

GPT will pop a little “Analyzing icon” that spins for a second or two before before answering:

Here is a list of ten random numbers with a mean of 20:

0,3,3,39,9,19,21,36,23,47

And if you click the icon it reveals this code that it wrote and then ran:

import numpy as np

# Generate 9 random numbers and calculate the 10th to ensure the mean is 20
np.random.seed(0)  # Seed for reproducibility
random_numbers = np.random.randint(0, 40, 9)  # Generate 9 random numbers
tenth_number = 20 * 10 - random_numbers.sum()  # Calculate the 10th number to ensure the mean is 20

# Combine the 9 random numbers with the calculated 10th number
complete_list = np.append(random_numbers, tenth_number)
complete_list.tolist()