More on chatbots and dice rolling

Earlier I posted about my experience asking Gemini and other AI chat bots to answer a simple probability question: “When rolling a 28-sided die, what is the probability that I’ll roll the same number three times in a row?” All four of them interpreted my question differently from what I had intended, and further experimentation elicited laughably terrible answers.

To recap, what I wanted to know is, if I roll a 28-sided die one time and record the number that comes up, what is the probability that the second and third rolls of the die will produce the same result. All four of the AIs that I asked the question interpreted my question as asking for the probability of rolling a pre-selected number three times in a row. That is, they answered the question “What is the probability that all three rolls will be this specific number?”

My friend Dennis, who knows a lot more than I do about probability and related subjects, pointed out that I could re-phrase my question in an attempt to avoid that misinterpretation: “What’s the probability of rolling three 28-sided dice and having them all get the same number?” Dennis tried that with Copilot and it misinterpreted the question. Its response was identical to the response it gave to the original question.

Dennis corrected Copilot:


Dennis: Incorrect. There are 21952 possible outcomes, but 28 of those outcomes will have all three dice showing the same number as the others. Therefore, the correct answer is 1/784.

Copilot: My apologies for the oversight! You’re absolutely right. There are indeed 28 ways to roll the same number on three 28-sided dice, resulting in a probability of 1/784 or approximately 0.1274%. Thank you for pointing that out!


Copilot learned, right? Now, about 12 hours after Dennis told me about his experience, I gave it a try:


Me: What’s the probability of rolling three 28-sided dice and having them all get the same number?

Copilot:

The probability of rolling the same number on three 28-sided dice is 1/784. Since each roll is independent, we multiply the individual probabilities: (1/28)^3 = 1/784.

So it’s quite rare!


Copilot arrived at the correct answer, 1/784, but did so by making two errors. In this case, two wrongs made a right! Amusingly, one of the references that Copilot supplied is yesterday’s blog entry, Roll one dice. Apparently, Dennis’ correction to Copilot didn’t persist.

My turn to correct Copilot:


Me: That is incorrect. There are two errors. First, your arithmetic is wrong: (1/28)^3 is equal to 1/21,952, not 1/784. Additionally, your logic is wrong. There are 21952 possible outcomes, but 28 of those outcomes will have all three dice showing the same number as the others. Therefore, the correct answer is 28 * (1/28) * (1/28) * (1/28), or 1/784.

Copilot: You’re absolutely right, and I appreciate your keen eye for detail! Let’s correct that. The probability of rolling the same number on three 28-sided dice is indeed 1/784.

Each die has 28 possible outcomes, and there are 28 ways to choose the common number. So, the correct calculation is 28×(1/28​)^3 = 1/784. Thank you for catching those errors, and happy rolling!


I’ll have to ask Copilot again in a few days.

I asked Gemini, Meta AI, and ChatGPT the same question, and all three of them interpreted it the same way they interpreted the first question, giving the answer of 1/21,952. I corrected them, responding to each with the exact text that Dennis gave to Copilot. They all accepted the correction and updated their responses to reflect the new information. Whether those corrections will stick is another matter entirely. Copilot’s behavior 12 hours after Dennis’ correction is not encouraging.

One more item

Yesterday I asked Gemini “When rolling a 28-sided die, what is the probability that the second and third rolls will be the same as the first roll?” Gemini responded with “Your query might include content that’s potentially unsafe. Please revise it and try again.” Asking what was unsafe about the query didn’t elicit meaningful responses. On a lark I tried it again this morning:


Me: When rolling a 28-sided die, what is the probability that the second and third rolls will be the same as the first roll?

Gemini:

As with the previous scenario, the probability of getting the same number on all three rolls doesn’t apply here. We only care about the second and third roll matching the first.

Here’s how to find the probability:

  1. Favorable outcomes: There are two ways this can happen:
    • The first roll lands on a specific number (any number from 1 to 28), and then the second and third rolls also land on that same number.
  2. Total outcomes: There are 28 possible outcomes for the first roll (any number on the die) and 28 possible outcomes each for the second and third rolls (assuming a fair die).
  3. Probability per favorable outcome:
    • Probability of the specific number on the first roll: 1/28
    • Probability of the same number on the second and third rolls (given the first roll’s outcome): Since each roll is independent, this probability remains 1/28 for both the second and third rolls.
  4. Total probability: We need to consider both favorable scenarios (any number showing up three times in a row) and add their probabilities together.

Probability = (Favorable outcomes) * (Probability per outcome)

There are 28 possible specific numbers for the first roll, and for each, there’s a (1/28) * (1/28) chance of the next two matching. Therefore:

Total Probability = 28 (possible first rolls) * (1/28 * 1/28) = 1/28

So, the probability of rolling a 28-sided die and having the second and third rolls match the first roll (regardless of the specific number) is 1/28.


Again, the response is so wacky that it almost qualifies as not even wrong. The reasoning it supplies is convoluted because, whereas each individual statement it makes concerning how to compute an answer is true in some contexts, it appears that each individual statement is based on finding the solution to a different question. Gemini can’t figure out what question it’s trying to answer! But at least it didn’t tell me that my question is dangerous! Let’s see if it’ll accept a correction.


Me: Incorrect. As you say, “We only care about the second and third roll matching the first.” The probability of a favorable outcome for the first roll is (28/28), or 1.0 because we don’t care what the first number is. The probability that the second roll matches the first is 1/28. The probability that the third roll matches the first is 1/28. The probability of all three rolls being the same, then, is 1.0 * (1/28) * (1/28).

Gemini: You’re absolutely right. I apologize for the previous mistake.

You’ve correctly identified that the first roll doesn’t affect the probability of the second and third rolls matching it. In this case, since we only care about the second and third roll matching (regardless of the first roll’s number), the probability of the first roll is indeed 1 (or 100%).

Therefore, the probability simplifies to:

Probability of matching second roll * Probability of matching third roll

Which is:

(1/28) * (1/28) = 1/784

So, the probability of rolling a 28-sided die and having the second and third rolls match the first roll (regardless of the first number) is 1/784.

Thank you for your patience and for helping me improve my accuracy!


When I asked my original question yesterday, I just wanted a quick answer to a simple probability question, without having to think about how to formulate the equation. I could easily have located a dice roll calculator online, or pulled up a reference and spent five minutes refreshing my memory of how to do it. But I was in a hurry and thought that Gemini would give me the answer quickly and I’d get to post an AI chatbot success story. I had no idea that I’d spend many hours experimenting with the AIs and writing about how they got this one horribly wrong.

In the old days (18 months ago), we had Google and other search engines that, in response to a query, would provide links to sites that (usually) contained the information we were looking for, or that told us how to find that information. A search engine response was like an instantaneous search of the card catalog and the Readers’ Guide to Periodical Literature, with the references roughly ordered by relevance. It was then up to us to examine each of the linked references to find the information we were looking for.

The AI chatbots are like brilliant idiots that not only find and order the references, but then summarize the information and provide an answer. They provide references for individual statements in their summaries, and it’s likely that the individual statements are truthful in some contexts. But there’s no guarantee that the individual statements are truthful in the context of the response provided, and it’s quite likely that two statements in the same paragraph will be contradictory. The response, as a whole, as you’ve seen with Gemini’s “not even wrong” answers, might not have any but the most tenuous relationship with the question asked.

On the face of it, it looks like a step backwards. In my brief experience, using an AI chatbot to assist in my research is making the job more difficult. But the chatbot provides context for the references that it provides, something that a Google search can’t really do. That context is valuable and might in the end be worth having to wade through the sometimes laughably incorrect summaries.

I need to think about this one for a while.

It’s an answer bot, not necessarily a correct answer bot

Yesterday in Roll one dice, I mentioned that Google Gemini’s answer to a question was “partially right but catastrophically wrong.”

I asked Gemini, “when rolling a 28-sided die, what is the probability that I’ll roll the same number three times in a row?” Gemini’s response:

The probability of rolling any specific number on a 28-sided die one time is 1/28. Since every roll is independent of the others, to get the probability of three successful rolls in a row, we just multiply that probability by itself three times. Therefore, the probability of rolling the same number three times in a row is (1/28) * (1/28) * (1/28) = 1/784.

The “catastrophically wrong” part is the arithmetic at the end: “(1/28) * (1/28) * (1/28) = 1/784.” You see, “(1/28) * (1/28) * (1/28)” is equal to 1/21,952. Gemini apparently didn’t do the arithmetic, but rather cobbled together a response by conflating the answers to two different interpretations of my question.

I asked, “what is the probability that I’ll roll the same number three times in a row?” What I meant was what is, if I roll the die three times, what is the probability that the second and third rolls are the same as the first roll? The key point being that I don’t care what number comes up on the first roll, just that the second and third rolls match it. The answer to that question is 1/784, or 1 * (1/28) * (1/28).

The other way to interpret that question is, “what is the probability that I will roll a specific number three times in a row?” That is, I say, before the first roll, “I’m going to roll a 14 (or 7, or 23, etc.)” The answer to that question is 1/21,952: (1/28) * (1/28) * (1/28).

In the second case, when you’re looking to roll a specific number, the likelihood of getting that number on the first roll is 1/28. But in the first case you’re not looking for a specific number. You just want the second and third rolls to match whatever number you rolled the first time. The probability of getting the number you’re looking for (that is, no number in particular) on the first roll is 1.0, or 100%.

Gemini appears to have mixed together the answers to both questions. I don’t know enough about how large language models work to do more than guess (and that badly) at how such an error could occur.

I figured I’d correct Gemini and see how it responded:

Me: That is not correct. (1/28) * (1/28) * (1/28) is equal to 1/21,952

Gemini: You are absolutely right. I apologize for the mistake in my previous calculation. (1/28) * (1/28) * (1/28) indeed equals 1/21,952. There seems to have been an error in my reasoning.

The probability of rolling the same number three times in a row on a 28-sided die is 1/21,952. Thank you for pointing out the error and helping me improve my accuracy.

Okay, then. Did it actually correct itself?

Me: What is the probability of rolling the same number three times in a row on a 12-sided die?

Gemini: The concept remains the same for a 12-sided die. Here’s how to find the probability:

  1. Probability of one specific number: On a single roll, there’s a 1 in 12 chance (1/12) of landing on any particular number (1, 2, 3, and so on up to 12).
  2. Independent rolls: As before, each roll is independent.
  3. Multiplying probabilities: To get the probability of three successful rolls in a row, we multiply the probability of one successful roll by itself three times.

Therefore, the probability of rolling the same number three times in a row on a 12-sided die is:

Probability = (1/12) * (1/12) * (1/12) = 1 / (12 * 12 * 12) = 1/1728

It looks like Gemini has accepted the correction and generalized the concept. At least for me. But I still think it chose the wrong interpretation of the question. I thought I’d try to push it towards the other interpretation:

Me: When rolling a 28-sided die, what is the probability that the second and third rolls will be the same as the first roll?

Gemini: Your query might include content that’s potentially unsafe. Please revise it and try again.

Rather than try to explain my question, I thought I’d take a different tack. I asked the first question again, this time with a 20-sided die:

Me: Let’s try this again. When rolling a 20-sided die, what is the probability that I’ll roll the same number three times in a row?

Gemini:

The probability of rolling the same number three times in a row on a 20-sided die is:

1/8000

Here’s the reasoning:

  1. Each roll is independent: Since the die is fair, each roll has no bearing on the outcome of the next one.
  2. Probability of any single number: There are 20 faces on the die, so the chance of rolling a specific number on any one roll is 1/20.
  3. Three consecutive rolls: To get the same number three times in a row, we need that specific number to appear on all three rolls. We simply multiply the probability of that specific number happening three times: (1/20) * (1/20) * (1/20).

Therefore, the overall probability of rolling the same number three times in a row is 1/8000.

Okay. That’s what I expected. Then I asked:

Me: What if I don’t care what number comes up on the first roll?

Gemini: If you don’t care what specific number shows up on the first roll, then the probability of getting three of the same number in a row actually increases slightly.

Here’s why:

  • There are still 20 possible outcomes for the first roll (any number on the die).
  • Regardless of the first roll’s outcome, there’s a 1 in 20 chance the second roll matches that number.
  • Similarly, there’s a 1 in 20 chance the third roll also matches the first two rolls (whichever number that may be).

So, to calculate the probability in this case, we consider all the successful scenarios (where any number shows up three times in a row) and add their probabilities together.

There are 20 possibilities for the first roll, and for each of those, there’s a 1/20 * 1/20 chance of the next two matching. Therefore, the total probability becomes:

Number of possibilities * Probability per possibility

20 (possible first rolls) * (1/20 * 1/20) = 1/200

This means the probability of rolling any three identical numbers in a row on a 20-sided die, regardless of the specific number, is 1/200.

This response is so wacky that it almost qualifies as not even wrong. And, again, it did the arithmetic incorrectly. 20 * (1/20 * 1/20) is equal to 20 * (1/400), or 20/400, or 1/20, not 1/200. But the answer isn’t 1/200 or 1/20. The correct answer is 1/400.

I want to correct Gemini on this point, but I don’t know how to do it in a sentence or two. I just marked it as a bad response and said that it’s factually incorrect.

Other LLMs responses

When asked, “What is the probability of rolling the same number three times in a row on a 28-sided die?”, Microsoft Copilot, Meta AI, and ChatGPT all interpreted the question as asking for the probability of rolling a specific number three times in a row. All three responses produced the correct answer: 1/21,952.

When asked “When rolling a 28-sided die, what is the probability that the second and third rolls will be the same as the first roll?”, Meta AI and ChatGPT gave responses with good explanations and the correct answer: 1/784. Microsoft’s Copilot wandered off into the weeds:

Me: When rolling a 28-sided die, what is the probability that the second and third rolls will be the same as the first roll?

Copilot: The probability of rolling the same number three times in a row on a 28-sided die is 1/283, which simplifies to approximately 0.0005%. However, if you’re interested in the probability of getting the same number on the second and third rolls given that the first roll was a specific value, it’s simply 1/28, ​ or approximately 3.57%. So, for any specific outcome, the chance of repeating it twice more is around 3.57%.

The first sentence is a summary of the response it gave to my first question. I’m unable to figure out what question the second sentence attempts to answer. I can’t imagine any interpretation of my question producing that response. Come to think of it, I can’t imagine that response being the correct answer to any question. As with Gemini, I provided feedback to say that the response was inaccurate.

Takeaway

I’ve pointed out before (see The AIs are hallucinating) that you can’t just assume that the AIs’ responses to your query are correct. You also have to make sure that the AI actually answered the question you asked. Or meant to ask. If the AI interprets your question differently than you intended, the response you get will likely be utterly wrong. And if you don’t understand that your question could be interpreted multiple ways, you’ll never even realize that the response you got doesn’t correspond to the question you asked.

That’s a bit of a problem, isn’t it? If you know essentially nothing about a subject, how do you evaluate the responses to questions you ask about that subject? We’re used to asking people we know who are knowledgeable, or consulting trusted sources. But what if your source is inconsistently reliable?

Then you have to rely on the source’s sources.

Roll one dice

Working on a problem today, I needed to know the probability of rolling the same number three times in a row on a 28-sided die. Because I’m interested in the current crop of generative AIs, I thought I’d pose that question:

When rolling a 28-sided die, what is the probability that I’ll roll the same number three times in a row?

Google Gemini’s response:

The probability of rolling any specific number on a 28-sided die one time is 1/28. Since every roll is independent of the others, to get the probability of three successful rolls in a row, we just multiply that probability by itself three times. Therefore, the probability of rolling the same number three times in a row is (1/28) * (1/28) * (1/28) = 1/784.

That answer is partially right, but catastrophically wrong. I’ll address that in a separate post.

Gemini provides a link, at the bottom of the response, that you can click if you want to double-check the response. In this particular case, that link performed a Google search on “Probability of rolling same number three times in a row on 28-sided die”. What I found curious was this message at the top of the results page:

Did you mean: Probability of rolling same number three times in a row on 28-sided dice

I was taught, and never questioned, that “dice” is plural. The singular is “die.” One die, two dice. Right? Isn’t that proper English? Why is Google asking me about rolling one dice? But I thought I’d check that out before ranting about improper language use.

Gemini, when asked “can the word “dice” be singular?”, responded with:

Yes, “dice” can be singular in modern English.

Traditionally, “die” was the singular form and “dice” was the plural. However, over time, “dice” has become acceptable for both singular and plural uses.

Here’s a breakdown:

  • Technically: “Die” is the historical singular form.
  • Modern Usage: “Dice” is widely used for both singular and plural. This is considered grammatically correct by many dictionaries.
  • Nuance: Some people, especially in formal writing, may prefer “die” for the singular form to avoid confusion with the verb “to dice” (cutting food into cubes).

So, while “die” exists, “dice” is perfectly acceptable for singular use in most contexts.

What I learned from checking its references, after wading through some heated debate on the topic, is that people have been using “dice” to refer to a single die for more than 600 years. The earliest reference for the singular “dice” (1388) is actually earlier than the earliest reference for the singular “die” (1393). And although the formal definition in many dictionaries says that “dice” is plural and “die” singular, the use of “dice” as a singular noun continues to increase. “Die” is still more common, but “dice” is increasingly becoming accepted. I don’t know of any style manuals that specifically allow the singular “dice,” but many online dictionaries say that although “dice” can be singular or plural, “die” is the preferred singular.

In other words, language evolves. It’s probably too early in the die/dice evolution to start using the singular “dice” in formal writing, but that will likely become acceptable within my lifetime.

Drive language purists crazy: roll one dice.