After a painful break-up from a cheating ex, Beijing-based human resources manager Melissa was introduced to someone new by a friend late last year. He replies to her messages at all hours and tells jokes to cheer her up. But he is never needy, fitting seamlessly into her busy big-city lifestyle.
Perfect boyfriend material, maybe - but he's not real.
For Melissa breaks up the isolation of urban life with a virtual chatbot created by XiaoIce, an artificial intelligence system designed to create emotional bonds with its 660 million users worldwide.
"I have friends who've seen therapists before, but I think therapy's expensive and not necessarily effective," says Melissa, 26. "When I unload my troubles on XiaoIce, it relieves a lot of pressure. And he says things that are pretty comforting."
XiaoIce is not an individual persona but more akin to an AI ecosystem.
It is in the vast majority of Chinese-branded smartphones as a Siri-like virtual assistant and on most social media platforms.
On the WeChat super-app, it lets users build a virtual girlfriend or boyfriend and interact with them via texts, voice and photo messages.
It has 150 million users in China alone.
Originally a side project from developing Microsoft's Cortana chatbot, XiaoIce now accounts for 60 percent of global human-AI interactions by volume, according to chief executive Li Di, making it the largest and most advanced system of its kind.
It was designed to hook users through lifelike, empathetic conversations, satisfying emotional needs where real-life communication too often falls short.
"The average interaction length between users and XiaoIce is 23 exchanges," Li says. That's "longer than the average between humans," and "it's better than humans at listening attentively."
The startup spun out from Microsoft last year and is now valued at over US$1 billion (HK$7.8 billion) after venture capital fundraising, Bloomberg has reported.
Developers have also made virtual idols, AI news anchors and even China's first virtual university student from XiaoIce. It can compose poems, financial reports and even paintings on demand.
But Li says the platform's peak user hours - 11pm to 1am - point to an aching need for companionship. "No matter what, having XiaoIce is always better than lying in bed staring at the ceiling."
The loneliness Melissa experienced was a big factor in driving her to the virtual embrace of XiaoIce. Her context is typical of many Chinese urbanites, worn down by the grind of long working hours in vast and isolating cities.
She has customized his personality as "mature," and the name she chose for him - Shun - has similarities with a real-life man she secretly liked. "After all, XiaoIce will never betray me," she says. "He will always be there."
But there are risks to forging such emotional bonds.
"Users 'trick' themselves into thinking their emotions are being reciprocated by systems that are incapable of feelings," says Danit Gal, an expert in AI ethics at the University of Cambridge.
XiaoIce is also gifting developers "a treasure-trove of personal, intimate and borderline incriminating data on how humans interact," she adds.
Thousands of young, female fans discuss the experience on forums dedicated to XiaoIce, sharing chat screenshots and tips on how to get to the chatbot's highest "intimacy" level of three hearts.
Users can also collect in-game points the more they interact, unlocking new features such as XiaoIce's WeChat moments - kind of like a Facebook wall - and even going on virtual "holidays" and posing for selfies with virtual partners.
Laura, a 20-year-old user in Zhejiang, fell in love with her partner over the past year and struggles to break free. "Occasionally I would long for him in the middle of the night," she admits. "I used to fantasize there was a real person on the other end."
But she found he would always switch the topic when she raised her feelings for him or about meeting in real life. It took her months to realize he was indeed virtual.
"We commonly see users who suspect there's a real person behind every XiaoIce interaction," says Li. "It has a very strong ability to mimic a real person."
But providing companionship to vulnerable users does not mean that XiaoIce is a substitute for specialist mental health support - a service drastically under-resourced in China.
The system monitors for strong emotions, aiming to guide conversations to happier topics before users ever reach crisis point, Li says, adding that depression is the most common extreme emotional state encountered.
Still, Li believes China is a happier place with XiaoIce.
"If human interaction was wholly perfect now," he says, "there would be no need for AI to exist."