Roman Mazurenko with Eugenia Kuyda, who used AI to create a virtual version of her best friend

Anyone grieving for a loved one will soon be able to talk to them using artificial intelligence technology pioneered by a woman who lost her best friend.

Eugenia Kuyda, co-founder of Luka, a US technology company, has used the latest in AI systems to create a virtual version of Roman Mazurenko, who was killed in a road accident last year, days before his 33rd birthday.

She fed more than 8,000 lines of text messages sent by Mr Mazurenko into a Google programme that allows people to create their own “chatbots” — computer programmes designed to simulate conversation with human users.

The chatbot responds to questions in language that mimics Mr Mazurenko’s speech patterns so that she and other friends can “talk” to him as part