top | item 46479988

Ask HN: How to Handle Randomness with AI?

2 points| dorianmariecom | 1 month ago

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

1 comment

order

PaulHoule|1 month ago

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.