LLMs Can’t Roll Dice
📰 Medium · Cybersecurity
LLMs can't generate true random numbers, which is a problem for generating keys or random strings, and instead predict statistically likely outputs based on training data
Action Steps
- Test an LLM like ChatGPT to generate a random number between 1 and 10 to see the predicted output
- Analyze the results to understand how the LLM's statistical likelihood predictions differ from true randomness
- Use alternative methods for generating truly random numbers, such as hardware random number generators or cryptographically secure pseudorandom number generators
- Evaluate the security implications of using LLM-generated random numbers in different applications
- Implement additional security measures to mitigate the risks associated with LLM-generated random numbers
Who Needs to Know This
Developers and cybersecurity professionals working with LLMs should be aware of this limitation to avoid using LLM-generated random numbers for security-critical applications
Key Insight
💡 LLMs are not designed to generate true entropy and instead predict outputs based on statistical likelihood
Share This
🚨 LLMs can't roll dice! They predict statistically likely outputs, not true random numbers. Be cautious when using LLMs for security-critical applications 🚨
Key Takeaways
LLMs can't generate true random numbers, which is a problem for generating keys or random strings, and instead predict statistically likely outputs based on training data
Full Article
Title: LLMs Can’t Roll Dice
URL Source: https://medium.com/@danielnochess/llms-cant-roll-dice-5f2aad47cf3a?source=rss------cybersecurity-5
Published Time: 2026-04-19T19:49:53Z
Markdown Content:
# LLMs Can’t Roll Dice. Have you ever asked an LLM like ChatGPT… | by Daniel Díaz | Apr, 2026 | Medium
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

# LLMs Can’t Roll Dice
[](https://medium.com/@danielnochess?source=post_page---byline--5f2aad47cf3a---------------------------------------)
[Daniel Díaz](https://medium.com/@danielnochess?source=post_page---byline--5f2aad47cf3a---------------------------------------)
Follow
4 min read
·
1 hour ago
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2F5f2aad47cf3a&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&user=Daniel+D%C3%ADaz&userId=37f3d7a2c9f5&source=---header_actions--5f2aad47cf3a---------------------clap_footer------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F5f2aad47cf3a&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=---header_actions--5f2aad47cf3a---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3D5f2aad47cf3a&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=---header_actions--5f2aad47cf3a---------------------post_audio_button------------------)
Share
Have you ever asked an LLM like ChatGPT or Claude to pick a random number between 1 and 10? It’s very probable that it will return 7, not because it’s “thinking” randomly, it’s because it “looks” like the most random number in that range.
The core issue is that LLMs are not designed to generate true entropy, the model isn’t really generating a random number, it predicts the number most statistically associated with randomness based on its training data. Since LLMs are trained on massive datasets and learn to predict the most likely next word or token based on the input, their outputs reflect statistical likelihood, not genuine unpredictability.
The problem appears when we use these tools to generate keys or any random string, you might promp it.
Press enter or click to view image in full size

The model asked it’s GPT-5.3. Results may vary across models and versions
Tadaaa 🪄, it generates something that looks impenetrable:
uP9#kL2!vA8*qR5$
It looks like a real strong passwor
URL Source: https://medium.com/@danielnochess/llms-cant-roll-dice-5f2aad47cf3a?source=rss------cybersecurity-5
Published Time: 2026-04-19T19:49:53Z
Markdown Content:
# LLMs Can’t Roll Dice. Have you ever asked an LLM like ChatGPT… | by Daniel Díaz | Apr, 2026 | Medium
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

# LLMs Can’t Roll Dice
[](https://medium.com/@danielnochess?source=post_page---byline--5f2aad47cf3a---------------------------------------)
[Daniel Díaz](https://medium.com/@danielnochess?source=post_page---byline--5f2aad47cf3a---------------------------------------)
Follow
4 min read
·
1 hour ago
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2F5f2aad47cf3a&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&user=Daniel+D%C3%ADaz&userId=37f3d7a2c9f5&source=---header_actions--5f2aad47cf3a---------------------clap_footer------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F5f2aad47cf3a&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=---header_actions--5f2aad47cf3a---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3D5f2aad47cf3a&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40danielnochess%2Fllms-cant-roll-dice-5f2aad47cf3a&source=---header_actions--5f2aad47cf3a---------------------post_audio_button------------------)
Share
Have you ever asked an LLM like ChatGPT or Claude to pick a random number between 1 and 10? It’s very probable that it will return 7, not because it’s “thinking” randomly, it’s because it “looks” like the most random number in that range.
The core issue is that LLMs are not designed to generate true entropy, the model isn’t really generating a random number, it predicts the number most statistically associated with randomness based on its training data. Since LLMs are trained on massive datasets and learn to predict the most likely next word or token based on the input, their outputs reflect statistical likelihood, not genuine unpredictability.
The problem appears when we use these tools to generate keys or any random string, you might promp it.
Press enter or click to view image in full size

The model asked it’s GPT-5.3. Results may vary across models and versions
Tadaaa 🪄, it generates something that looks impenetrable:
uP9#kL2!vA8*qR5$
It looks like a real strong passwor
DeepCamp AI