Artificial intelligence has potential to counter vaccine hesitancy while building trust in vaccines, but it must be deployed ethically and responsibly, argue Heidi Larson and Leesa Lin