Boffins have created an artificial intelligence “ghostbot” to allow relatives to chat with a loved one from beyond the grave.

Tech giant Microsoft is behind the innovative app that uses information such as videos, letters, social media posts and voice recordings of the deceased to allow the living to keep their memory alive with catch-up conversations.

Microsoft revealed the ghostbot can be trained to pick up the quirks and nuances of the person who has died such as “style, diction, tone, voice and intent”, so interaction is realistic enough to seem like they are in the room or on the phone.

It has applied for a patent for the hi-tech tool that could even work with a smart speaker such as Amazon’s Alexa or Google Nest.

The bot uses existing material to create a persona similar to them
The bot uses existing material to create a persona similar to them

The patent states: “Social data may be used to create or modify a special index in the theme of the specific person’s personality.

“The special index may be used to train a chat bot to converse and interact in the personality of a specific person.”

According to Microsoft, the artificial intelligence (AI) technology could even be used to bring an historical figure or celebrity back from the dead.

The patent added that 2D or 3D technology could also be used to create an image of the deceased.

Filed last month to the US Patent and Trademark Office, it stated the living would also be able to upload all their information and images so they could one day chat with loved ones from beyond the grave.

Website  techrepublic.com  called the idea “intriguing and terrifying” and added: “The concept raises the possibility of allowing someone to live on after death in the form of an AI chatbot, using the reams of data generated by that person over the course of their life.”

In October rapper Kanye West stunned his reality star wife Kim Kardashian – and the world – with a hologram of her late father Robert to mark her 40th birthday.

His surprise present of the lawyer who died in 2003 reduced her to tears as the hologram danced and told her he was proud of her and her family and was watching over her.

Mother of four, Kim, who married West in 2014 tweeted: “For my birthday, Kanye got me the most thoughtful gift of a lifetime. A special surprise from heaven. A hologram of my dad. It is so lifelike! We watched it over and over, filled with emotion.”