Large language models like GPT-3 (and GPT-3.5 which underlies ChatGPT) are not trained to do specific tasks. They are trained with a wide range of knowledge which they can then apply to other domains.