you know how when someone asks you something where you don't know what to answer, so you answer what you think you're suppossed to say? thats what the ai chatbot is doing. its just learned what a human is supposed to say. ai algorithms optimize some weights, which when put in a statistical model outputs different answers. it doesn't have memory, a sense of self etc. it looks at what you say and what it has said so far in a conversation. and uses those to make coherent sentences. for example by reading the internet it has for sure read stories of artificial intelligences and likewise which would answer similarly