Facebook has apologized for showing a photo in its "Year in Review" feature of one user's daughter who died this year, learning in the process that algorithms are not always the best tools.

With this feature, users are able to select photos, wall posts and other content automatically from a user's past year, and the content with the most likes or comments are offered as "highlights" of the year that users can put together in a scrapbook, according to The Guardian.

The social networking service decided this year to post one particular photo under the banner: "Here's what your year looked like!" which would have brought back happy memories like a graduation or a child's birth for some people. However, this photo did the exact opposite for others.

"Yes, my year looked like that," web designer Eric Meyer wrote in a post titled "Inadvertent Algorithmic Cruelty," referring to the photo of his daughter, Rebecca, who died in 2014. "True enough. My year looked like the now-absent face of my little girl. It was still unkind to remind me so forcefully."

Meyer added that he knew the photo was not posted to hurt him intentionally, and that the feature works in most cases, "reminding people of the awesomeness of their years, showing them selfies at a party or whale spouts from sailing boats or the marina outside their vacation house," The Guardian reported.

Jonathan Gheller, product manager of Year in Review, apologized to Meyer about the mistake. He also said that while the app was designed to be fun for everyone, he acknowledged that they produced the opposite result for Meyer.

"We can do better - I'm very grateful he took the time in his grief to write in the blog post," Gheller added.

Similar stories of grief included writer Julieanne Smolinski discussing one photo showing her ex-boyfriend's house on fire for his Year in Review, and user Mark Duffy discussing a photo posted of his dead father's ashes for his Year in Review, The Guardian reported.

Meyer made several suggestions for Facebook to avoid this situation, such as asking users if they would like to try a preview of the app before having the photos posted.

"It may not be possible to reliably pre-detect whether a person wants to see their year in review, but it's not at all hard to ask politely - empathetically - if it's something they want," he added. "That's an easily solvable problem. Had the app been designed with worst-case scenarios in mind, it probably would have been."

Facebook has already responded to feedback with some improvements to the feature, such as replacing the words it ended the slideshow with, which used to be "It's been a great year! Thanks for being a part of it," with "See you next year!," something more neutral.