Facebook and Instagram's parent company has been investing huge sums of money in AI, but it lags behind competitors.