ChatGPT as a "large language model" is trained on massive amounts of data about code, and information from books, articles and internet to help it learn dialogue and attain a human style of responding.