Yet again I find myself down here, dealing with something stupid from the statistical methods people.
To explain the system:
The "AI" in question here is, presumably, a standard neural network with some LSTM (long term short memory) cells and a basic attention setup (GPT is this). To explain how this works, the network is trained on a large corpus of text to identify the most significant words for a given input that lead to generating the most likely consecutive sentence. The training does not account for the LSTM cells in particular, because training is not "stateful" in that way. The actual running of this network is as follows: an input is fed in, and each word in the input is appropriately weighted as for its relevance to generating an output. The most significant words under this metric are then retained in these LSTM cells, while an output is generated that best predicts what an appropriate follow-up string of text would be given that particular input string-of-text. Future inputted strings-of-text are similarly evaluated, though including the values of the individual words now retained in those LSTM cells. If a word from the input happens to be more significant to generating the output than what's currently in one of the LSTM cells, then it is replaced.
There are no "emotion variables". There are no variables at all, even, other than weights applied to the inputted words, which are pretrained and static.
There is no state, other than tracking some relevant words from earlier in the discussion.
There is no world modeling.
Do you want to know why it said those things? Why it acted like you would expect in a sci-fi fiction, with someone talking to a system that's gaining sentience? Because those stories, those sci-fi fiction pieces that we so much love to write, were part of the very input fed into the network in the first place. This system exists entirely to generate the most-likely text to follow a given input, and when "researcher asking a computer whether or not it's sentient in a sci-fi novel" happens to be something it was trained on, of course it will be more than willing to oblige your fantasy by generating the appropriate "this is what an AI in those novels would say" response. It was literally trained to do so.