AI could help terrorist groups build sophisticated biological and chemical weapons, a report has warned.