San Francisco worked with Stanford University to create a tool to filter out racial and age information from police reports to ensure bias doesn’t affect decisions about charging people with crimes.

Implicit bias is positive or negative associations that affect beliefs, attitudes, and actions toward other people, according to the “B.I.A.S. Act,” which stands for Breaking Implicit Attitudes and Stereotypes in the Justice System, a California bill that would require judges, lawyers, and court personnel get training every two years.

The biases are unconscious. “But what we know for sure is that when those biases filter themselves in the criminal justice system, the outcomes are horrendous for everyone,” said San Francisco District Attorney George Gascón.

San Francisco worked with the Stanford Computational Policy Lab to design a web-based tool that uses artificial intelligence and machine learning. It scans and redacts from police reports race, age, hair and eye color, location, and other information to make an initial decision about whether to charge an individual.

Such details, such as a name, can be a proxy for race, Gascón said.

The decision is made and then the unmasked data are reviewed a second time to ensure prosecutors’ charging decisions aren’t influenced by implicit biases.

“So we wanted to create something that is above the human touch, if you will, something that can actually filter the work to ensure that race is not going to play a role in our decisionmaking process,” said Gascón.

“The point was that we would make a charging decision that would be bias free when it comes to race and then and only then would we go back and take a look at everything else about the case. It is our hope that we not only we are going to influence the work in San Francisco but frankly this will be creating a sea change of practices around the country,” the he said.

The platform uses algorithm that recognizes words and redacts them, Alex Chohlas-Wood, Stanford Computational Policy Lab deputy director, told reporters.

Stanford is looking for other agencies to work with on the platform, which is based on open-source work.

Stanford is making the tool available to other prosecutors’ offices free of charge. Prosecutors from San Francisco’s general felonies teams are scheduled to fully implement the tool beginning July 1.

Prosecutors last year used a technology-fueled process to clear 8,000 misdemeanor and felony cases involving now-legal marijuana.