Amazon has been grappling with a reputation for slipping behind rivals in developing AI products.