Eugenia Kuyda, a software developer from the US, has developed a chatbot which is almost identical in speech to her late friend, Roman Mazurenko.
Mr Mazurenko died in 2015 in a car crash just days before he was due to turn 33.
As a result, when the 29-year old Ms Kuyda or one of her friends chats to the bot, it responds in a similar vein to how Mr Mazurenko would talk through text.
Ms Kuyda says bots like this will help people with the grieving process, and says that the bot does indeed sound like her late friend.
The ability to give machines a voice and personality has been the subject of many sci-fi films, and the push in natural language processing has brought that idea closer to reality.
Artem Rodichev, a machine learning engineer at AI chatbot start-up Luka.ai, said he believes better service comes when the chatbot is more personalized and adaptable to an individual’s needs. The chatbot has to be given a dataset of words and a lot of messages stored in texts or whatsapps so it can learn to talk like the user.
However, Ms Kuyda is not the only one to be inspired by the dark show.
LA-based entrepreneur Josh Bocanegra has been recording audio of his mother, so that when she dies, he can continue having phone chats with her.
Various algorithms decide if a particular word is good or bad by assigning a high or low score to it, and then choose how the chatbot should respond.
The output text is chosen by how well it correlates to the input text, which the system has learned from analyzing streams of text from the user.