First Secretary Louise Haigh said artificial intelligence had the potential to improve lives but guardrails were needed to prevent harm.