Explain how AI can be trained to identify phishing attempts and social engineering attacks by analyzing emails, websites, or social media posts. What types of AI models are most effective in detecting these threats, and how can they be deployed in real-time?