HACKER Q&A
📣 dorianmariecom

How to Handle Randomness with AI?


hi,

i end up making the ai (openai) chose 20 random words, then taking a random word from those and passing it to the next call to the ai.

i also use the seed parameter but it keeps giving the same answers even with different seeds

what do you think?

thanks, dorian


  👤 PaulHoule Accepted Answer ✓
Humans are terrible at generating randomness, this is why we have coins, dice, cards, the I Ching and such. So are LLMs.

In the case of AI you generate randomness outside the AI. For instance a Python script that picks a random word out of /usr/share/dict/words; ask the AI to write the script if you want. Or call out to a tool.