NurPhoto/Getty

Facebook says its artificial intelligence systems weren't prepared for an event like the livestreamed massacre at two mosques in New Zealand last week.

The world's largest social network has been criticized for the failure of its AI technology to detect video of the terrorist attack automatically.

In a blog post Thursday, Guy Rosen, vice president of product management, said that in order for AI to recognize something, it has to be trained on what it is and isn't. For example, you might need thousands of images of nudity or terrorist propaganda to teach the system to identify those things.

"We will need to provide our systems with large volumes of data of this specific kind of content, something which is difficult as these events are thankfully rare," Rosen said in the post. In addition, he noted that it's a challenge for the system to recognize "visually similar" images that could be harmless like live-streamed video games.

"AI is an incredibly important part of our fight against terrorist content on our platforms, and while its effectiveness continues to improve, it is never going to be perfect," Rosen said.

Facebook's AI challenges also underscore how the social network relies on user reports. The social network didn't get a user report during the alleged shooter's live broadcast. That matters, Rosen said, because Facebook prioritizes reports about live videos.

Now playing: Watch this: Facebook deletes 1.5M videos after shooting, Democrats...

Since the shooting in Christchurch, which left 50 dead, Facebook, Google and Twitter have also had to answer questions about how to control the spread of the gunman's livestreamed footage.

On Monday, Facebook said that fewer than 200 viewers saw the live broadcast and that the video reached about 4,000 views before it was taken down. The first user to report the video did so 12 minutes after the livestream ended. In the first 24 hours after the event, Facebook purged 1.5 million uploads of the video, 80 percent of which were blocked before going live on the social network.

Facebook has rules against expressing support or praise for terrorists.

Some social media experts have argued Facebook should delay live videos like TV stations sometimes do, but Rosen argued it wouldn't fix the problem because there are millions of live broadcasts on Facebook every day.

"More importantly, given the importance of user reports, adding a delay would only further slow down videos getting reported, reviewed and first responders being alerted to provide help on the ground," he said.

Thursday's post also outlined steps Facebook still plans to take, including improving its matching technology, figuring out how to get user reports faster, and working further with the Global Internet Forum to Counter Terrorism.

Originally published March 21, 7:09 a.m.

Update, 10:45 a.m.: Adds more background