How is ChatGPT able to generate a response given prompts

It’s a good point that other people have noticed recently as well. The state of the art is always moving in ML/DL/AI and this is a good example. Here’s another recent thread about this same question.

If your question is specifically how ChatGPT accomplishes what it does, I have not actually read any articles on that. I’m sure a search will turn up plenty. The topic of Transformers is covered here in DLS Course 5 and also in the NLP Specialization Course 4.