As the largest social network, Facebook is home to billions of users and billions more posts, photos and videos shared on a daily basis.

The social network’s global scale — and the extensive efforts it undertakes to keep the platform from descending into chaos — was outlined Tuesday in its first ever transparency report. It addressed how Facebook enforces its guidelines, detailing the removal of hundreds of millions of fake accounts and spam items in the first three months of 2018.

Facebook said it was able to remove so many accounts and posts that violated its community standards thanks to its AI tools. All 836 million spam posts were flagged by an artificial intelligence program before human users reported them, according to the report. The only category AI flagged first less than 86 percent of the time was hate speech, which it flagged first 38 percent of the time.

“My top priorities this year are keeping people safe and developing new ways for our community to participate in governance and holding us accountable,” said Facebook CEO Mark Zuckerberg in a post on his profile Tuesday. “Thanks to AI tools we’ve built, almost all of the spam was removed before anyone reported it, and most of the fake accounts were removed within minutes of being registered.”

Zuckerberg noted that there is still room for improvement with Facebook’s AI tools — noticeably flagging hate-speech content. Hate speech is difficult to flag using AI because it “often requires detailed scrutiny by our trained reviewers to understand context and decide whether the material violates standards,” according to the report.

Since the fallout over political firm Cambridge Analytica obtaining millions of Facebook users’ data without their permission, Facebook reiterated its commitment to being more transparent. In April, Facebook published its internal guidelines on how it decides to remove posts that include hate speech, violence, nudity, terrorism and more.

Facebook also made available information on government requests for its user data. In the second half of 2017, Facebook received 82,341 requests from governments around the world — more than any previous half-year since it began tracking in 2013. In nearly 75 percent of the requests, some user data was provided to the governments.