Technical Countermeasures for Security Risks of Artificial General Intelligence