It can help trace missing children, but misidentifies people of color. It can help detect cancer, but may recommend the wrong cure. It can help track criminals, but could aid foreign enemies in targeting voters. It can improve efficiency, but perpetuate long-standing biases.

The “it” is artificial intelligence, a technology that teaches machines to recognize complex patterns and make decisions based on them, much like humans do. While the promised benefits of the technology are profound, the downsides could be damaging, even dangerous.

Last year police in New Delhi, for example, traced 2,930 missing children in four days by using an experimental facial recognition technology that identified them by examining a database of 45,000 kids living in shelters and homes. Yet a facial recognition tool developed by Amazon and tested by the American Civil Liberties Union in 2018 incorrectly identified 28 members of Congress as having been arrested for a crime, disproportionately picking out African American lawmakers, including civil rights icon John Lewis.

Significant advances in computers’ ability to recognize visual patterns and human languages, including voice and text recognition, and to learn without supervision have brought machines closer to achieving cognitive tasks once reserved for humans. Vast quantities of data held privately and by governments are the necessary “food” that computers must digest to learn the new skills.