Silicon Valley, a region that attracts a diverse population from across the country and world due to its thriving tech sector, faces an existential question with real-world consequences: how might its mix of cultures change local policing?Some recent history has created fertile ground for such a question.In 2008, Palo Alto's police chief reportedly retired after a controversial order for officers to specifically stop African-American men. Last year, Stanford researchers found that Oakland police officers were more likely to handcuff, search and arrest African-American men than any other group. The Justice Department recently said the San Francisco Police Department disproportionately targets people of color. In San Jose, local media reported disparate treatment by police of African-Americans and Latinos — even leading to a federal lawsuit.Overall, Bay Area residents are almost a quarter Hispanic or Latino, a quarter Asian, and markedly foreign-born (30 percent). More than 112 languages are spoken across the Bay Area, according to the San Francisco government. The region's technology-driven economy might continue pushing up those numbers; tech leaders are calling for more diversity in their predominantly white and Asian campuses. (Facebook did not reply to requests for comment about its diversity statistics. Both Apple and Google responded but said they do not provide further granularity than the demographic data on their diversity websites.)In Menlo Park, home to Facebook, police commander Dave Bertini says, "It's important that we try with all our might to hire people who are mirroring our communities." While Menlo Park is mostly white (70 percent), recent census data show the city's population as 18 percent Hispanic or Latino, about 10 percent Asian and just shy of 5 percent African-American. As of 2015, Menlo Park Police Department personnel were 25 percent Hispanic, about 8 percent Asian and 5 percent African-American."You're dealing with people of different cultures, different backgrounds, different experiences, who perceive things differently," said Bertini, who believes his police force's education level exposes them to more ideas and allows officers to better understand different people. About half of the Menlo Park police department has at least an associate's or bachelor's degree. In California, all officers are required to undergo cultural diversity and discrimination training as part of the police academy, which includes understanding the cultural composition of the state and discussing the impact of racial profiling.In neighboring Palo Alto, where 64 percent are white, 6 percent are Hispanic, 27 percent are Asian and about 2 percent are African-American, the officers are: 64 percent white, 12 percent Hispanic, 11 percent Asian and 7 percent African American.In Menlo Park, where most officers can't afford to live in the neighborhoods they patrol (Zillow lists the median home value at $1.9 million), they are expected to be aware that people's unique experiences affect their interaction with law enforcement, Bertini said. "There are certain people on both sides of the aisle — when it comes to law enforcement and the public — who just have ingrained in them for whatever reason, whether it's their experience or what they've been told or what they've seen or what they assume or presume, that we're all one thing," Bertini said.While experts say relying too heavily on using the demographics of a population to monitor police behavior is not ideal, doing so can be helpful for residents to feel represented in how and by whom they are being policed. "When law enforcement can't figure out what's going on in a given situation, when they can't relate to and engage with folks, then you're much more likely to have escalation during a conflict or during an encounter — and you're going to have lack of trust," said Phillip Atiba Goff, co-founder and president of the Center for Policing Equity at the John Jay College of Criminal Justice.That trust eroded Dominique Carter, who was driving her new BMW sedan with her mother in East Palo Alto in February when, she says, city police stopped them. Dominique and her mother, Joan Carter, a longtime technology executive, believed there was no probable cause for being stopped: they said they were going the speed limit, did not roll through stop signs, and new-car registration papers were displayed in the front windshield. The two police officers told them they were checking to make sure their new vehicle was not stolen."We felt harassed," Dominique said. "We felt that we had been racially profiled. And we felt that these officers had not treated us with much dignity and felt that they could take liberties with us and speak down to us." The Carters felt they were racially profiled as two black women driving a new luxury car. So they filed a complaint letter with the city. "The way he [one of the East Palo Alto officers] talked to me, the way he treated us, the disrespect, was like he didn't even look at me like I was a person... that hurt," the elder Carter said. East Palo Alto Police Department said it has received the complaint, assigned it for "an internal affairs investigation" but would not discuss it further, citing it as a personnel matter.Ed Maguire, an Arizona State University criminologist who studies public perceptions of police, says a growing body of research suggests "When police treat people in a way that they perceive as procedurally unfair, those people not only less likely to obey or comply with the requests of that specific officer, but they end up sort of registering lower levels of legitimacy for the police as an institution." Simple things like how officers talk to people really matter, he said.Devin Guillory, an African-American software engineer at Etsy in San Francisco, says he hasn't had any dramatic experiences with police in the Bay Area. But his parents advised him at a young age to make sure he crosses the street correctly, and not to have a smart mouth, and not to talk back to police. "Even within the privileged class of people who exist at these great institutions, that have these great jobs ... I think you'd be unsurprised at the number of people of color who had very negative experiences with police," said Guillory, a former Stanford University football player."You always have your guard up as a black man, anyway," said Ato Walker, an African-American San Jose resident who sued city police for their treatment of him. In 2013, Walker was charged with resisting arrest, after an argument with a parking officer escalated, eventually involving multiple officers. "We need to do better to train our officers better," Walker said. "We need to have more citizen oversight of the police officers' roles and relationships with community."ASU's Maguire's research found that while most of the general population in the United States has positive feelings towards and trusts the police, among specialized populations, like ethnic-minority communities, the ratings can be "dramatically low." It's not just someone's personal experiences, Maguire says, but also that of siblings, parents, friends and neighbors that contribute to beliefs about police. "So you end up having communities where you have these really dramatic deficits in police-community relationships," he said.In recent years social media has brought an unprecedented level of raw witness accounts of police encounters, but that exposure does not necessarily help. "Among people who already have reasons to have concerns about the police, social media dynamics tend to amplify those pre-existing concerns," Maguire said.Center for Policing Equity's Goff says good law enforcement officers are attuned to their audience. "It just doesn't make sense to talk to a group of community members who are angry with police treatment in the same way you would to someone who's at the top of a political hierarchy," Goff said. Goff, who helps run the National Justice Database, believes gathering traffic stop data about who is getting stopped, analyzing it and providing that analysis back to the police and communities can help move things forward. "We put nerds in the middle and the nerds create the table where traditional adversaries can sit down," he said.California's Racial and Identity Profiling Act of 2015 (AB 953) is rolling out mandates for law enforcement agencies across the state to collect and report races of people they are stopping during traffic stops – if they are not already doing so. Menlo Park's Bertini says his department will likely be participating sooner than its mandate in 2023, but it might be challenging since a person's race is not printed on the California driver's license. "When someone stops you and they're giving you a ticket, they're assuming your race. Unless they ask you," Bertini said. "It's impolite, it's kind of awkward to say, "Hey, what race are you? Where do you come from?"Could a techie solution help ease the awkwardness?Duke University students Vaibhav Tadepalli and Chris Reyes developed a prototype robot that could someday conduct the initial phase of a traffic stop, possibly easing concerns for both drivers and police officers. With the press of a button, an officer can deploy the "Sentinel" robot from a patrol car that rides over to the stopped driver's car, raises a screen and starts a two-way video conference between the driver and the police officer.Vignesh Ramachandran is a freelance journalist in the San Francisco Bay Area. Copyright 2017 NPR. To see more, visit http://www.npr.org/.