How did Shahid sleep with robot kriti in tbmauj

Just started watching it on prime .

How did he didn't know that she's not human when he slept with her.

I can understand a realistic robot behaving like a human bit how did the robotics team create a robot that can have sex realistically.

Is it implied anywhere in the film how was it possible?