There’s all kinds of “random”. AFAIK, ChatGPT finds the set of most-likely next word, sorted by likeliness. Then, selects from those, more likely the more likely ones, varying away from the top picks in proportion to the “temperature” parameter.
So, even if the chat goes astray, the sequence will continue on a path that feels natural because it is the natural way to go when going astray.
So, even if the chat goes astray, the sequence will continue on a path that feels natural because it is the natural way to go when going astray.