AI writing code for humanity, but be cautious: PM