Programmer Caleb wins a one-week visit to the secluded home of Nathan, the CEO of his software company. The only other person there is Nathan’s housemate Kyoko, who Nathan says does not speak English. Nathan has built a humanoid robot named Ava with artificial intelligence (AI) and wants Caleb to administer a Turing test, which tests an AI’s ability to persuade the tester it is human. Caleb points out that this is not a fair test, as he already knows Ava is an AI; Nathan responds that Caleb must judge whether he can relate to Ava despite knowing she is artificial. Ava has a robotic body but a human-looking face and is confined to her apartment. Caleb grows close to her, and she tells him she wants to go on a date with him. She reveals she can trigger power outages that temporarily shut down the surveillance system that Nathan uses to monitor their interactions. The power outages also trigger the building’s security system, locking all the doors. During one outage, Ava says Nathan is a liar who cannot be trusted. Caleb encourages Nathan to drink until he passes out, then steals his security card to access Nathan’s room and computer. After he alters some of Nathan’s code, he discovers footage of Nathan mistreating earlier robot models, and discovers that Kyoko is also a robot. Back in his room, Caleb cuts his arm open and investigates his flesh. At their next meeting, Ava cuts the power. Caleb says he fears Nathan will reprogram her, “killing” her. Caleb tells her he will get Nathan drunk and reprogram the security system to lock Nathan in his room; that night, Ava will trigger a power failure, activating the security system, and Caleb and Ava will leave together. Nathan reveals that he recorded their conversation with a battery-powered camera. He explains that because Ava seduced Caleb into helping her escape, she has passed the test. Ava cuts the power, and Caleb reveals that he already reprogrammed the doors to open. Ava leaves her confinement and Nathan knocks Caleb unconscious. As Nathan begins to drag Ava back to her confinement, Kyoko stabs him with her kitchen knife. Nathan knocks her inert, but is stabbed to death by Ava. Ava acquires parts from another android, taking on the appearance of a complete human woman. Leaving Caleb trapped inside the facility, Ava is picked up by the helicopter meant for him and enters human society.