Tech companies pitch chatbots to businesses as a way to keep customers coming back for more. A new bot built by Microsoft employees in their spare time is designed to do exactly the opposite.

The chatbot, tested recently in Seattle, Atlanta, and Washington, lurks behind fake online ads for sex posted by nonprofits working to combat human trafficking, and responds to text messages sent to the number listed. The software initially pretends to be the person in the ad, and can converse about its purported age, body, fetish services, and pricing. But if a would-be buyer signals an intent to purchase sex, the bot pivots sharply into a stern message.

“Buying sex from anyone is illegal and can cause serious long term harm to the victim, as well as further the cycle of human trafficking,” goes one such message. “Details of this incident will be reviewed further and you may be contacted by law enforcement for questioning.” The warning can vary based on the conversation, if, for example, a potential buyer expresses an interest in someone underage.

Microsoft employees built the bot in a philanthropic initiative called Project Intercept, in collaboration with nonprofits that hope it can reduce demand for sex workers, and the incentives for criminals to coerce people into the sex trade. The technology is not a product of Microsoft itself. The National Human Trafficking Hotline received more than 5,000 reports of sex trafficking in 2016, but most cases are believed to go unreported.

Project Intercept’s lead partner, Seattle Against Slavery, is working with counterparts in 21 other U.S. cities, including Boston and Houston, to deploy the bot more widely. So far, the chatbot has exchanged 14,000 messages with nearly 1,000 people who responded to the planted ads. In about half those cases it heard enough to deliver a warning message.

Microsoft

“If law enforcement perform stings in a city they might get a few dozen people, but we know there have to be thousands and thousands of guys out there looking to buy sex,” says Robert Beiser, executive director of Seattle Against Slavery. “Wasting their time and delivering a deterrence message could change their perspective on what they’re doing.”

Project Intercept was started in 2012 by two Microsoft employees after seeing a documentary about sex trafficking, Rape For Profit. “I thought we should be able to use the things that we work with every day to help,” says Greg, a senior product manager at Microsoft, who asked not to disclose his last name to avoid recriminations from people involved in the sex trade. “NGOs had strategies that were pretty effective but no way to scale them.”

The pair’s initiative first took shape when they entered the philanthropic category of Microsoft’s annual week-long hackathon in 2012. They used the company’s Azure cloud platform to build an improved version of Microsoft technology called PhotoDNA that automatically detects and reports images of child exploitation. Before long, 40 colleagues had joined to volunteer on the project. PhotoDNA is now used by more than 70 companies and organizations, including Facebook and Twitter.

Last summer, the volunteers began thinking about bots, after Microsoft launched a bot-building toolkit aimed at automating customer service. Limitations of the software have produced mixed results for businesses, but the deter-o-bot has proven good enough at its job.

“It helps that the guys who are buying sex are not paying much attention to the human being on the other end of the phone,” says Beiser, of Seattle Against Slavery. Microsoft itself stumbled with its Tay research chatbot that accidentally started talking dirty, but the sex-trade bot does not learn from people it talks to in the same way.

Microsoft

Seattle Against Slavery is also distributing a second service developed by Project Intercept, called Victim Reachout. It harvests phone numbers from real online sex ads, and automatically sends messages to sex workers offering support or assistance getting out of the trade. Responses are routed to an experienced nonprofit employee or volunteer. “It’s really accelerated our ability to reach people,” says Amanda Hightower, executive director of nonprofit Real Escape from the Sex Trade, or REST.

The new tools arrive as nonprofits and law enforcement devote more attention to stifling the demand that leads to sex trafficking. Dominique Roe-Sepowitz, director of Arizona State University’s Office of Sex Trafficking Intervention Research, says they could help expand the reach of anti-trafficking efforts. Research in Phoenix has shown that on average a single online sex ad attracts 63 potential buyers. “There aren’t enough detectives in the world to match the size of this market,” says Roe-Sepowitz.

Don’t expect the Microsoft tools to make a huge dent in demand overnight. Roe-Sepowitz says that while education and deterrence make sense, it’s been hard to prove what tactics are most effective. When detectives in Phoenix used fake ads to surprise people looking to buy sex, nearly half of callers who were contacted by a cop later called another spoof ad.

Those working with the new tools hope the software can help with that problem, too, by allowing groups to test different messages and approaches at large scale, and gauge which are most effective. “The hope is to get this activity down and protect a lot of people,” says Beiser.