This is the core concept behind the Black Mirror episode "Be Right Back" (201).
Like most early-season episodes, it's incredibly depressing but absolutely worth watching. And honestly, I wouldn't mind if AI researchers were forced to watch it (along with The Animatrix).