In this article, we will explain how ChatGPT works and why it is able to produce coherent and diverse conversations.