The results of Tuesday’s US election shocked many–including pollsters and campaign insiders. As a result, many have begun questioning the data and methods behind predictions, wondering what went wrong.

But not everyone got it wrong: An AI tool created by an Indian startup in Mumbai in 2004 has correctly predicted the last three US elections, including this one.

By collecting and analyzing 20 million social media data points, MogIA, developed by Sanjiv Rai, has used sentiment to determine political outcomes. And social media has proven to have a powerful impact on candidates’ popularity. As TechRepublic’s global editor Jason Hiner wrote, “Twitter has been Donald Trump’s greatest ally.”

Why is this approach successful? “Social media engagement is a much better measure of political support in comparison to classical surveys,” said Roman Yampolskiy, director of the Cybersecurity Lab at the University of Louisville. “People may not be willing to share their true preferences with a stranger, because of fear of being judged for supporting an unpopular candidate, but their online posting/reposting/liking behavior doesn’t lie.”

Still, while this method may have been accurate, other AI experts urge caution in interpreting its success.

“I don’t think that the ‘AI predictions’ mean anything in this case,” said Marie desJardins, AI professor at the University of Maryland, Baltimore County and former chair of the National Conference of the Association for the Advancement of Artificial Intelligence (AAAI). “The tipping point was Comey’s announcement about Hillary’s emails, which was of course a complete red herring and a misleading non-event–but people didn’t see it that way, and it sent the electorate into a tailspin that was too late to recover from.”

DesJardins doesn’t see any statistical significance in the results. “Claiming a win for AI because it made the right prediction in a singular event, is like believing that Nostradamus was a prophet because some of his predictions happened to come true.”

SEE: Can social media call the election? (CNET)

“Presidential elections are huge dynamic complex systems,” she said, and three is a “teeny tiny sample.”

Many factors, desJardins said, could have flipped the results. And that’s because elections are full of latent variables–these kinds of variables, like beliefs, are critical yet impossible to measure directly.

TechRepublic’s own swarm AI–which has proven remarkably successful in making other predictions, like the 2016 Kentucky Derby winner–also failed in this case: It predicted Clinton would win, “by a little.”

“I am very cynical about [MogIA],” said Moshe Vardi, professor of computer science at Rice University. “It is very easy to make predictions. If they are wrong, we forget about them. But if you happen to be right a few times, people think that you are clairvoyant.”

TechRepublic communicated with Rai, creator of MogIA, who declined to comment on the criticism.

Also see…