After years as an also-ran, the startup has pulled ahead in the artificial-intelligence race after focusing on enterprise users and coding.