AI-driven threat prevention