Are the dialogs at Sophia's (the robot) appearings scripted?
Sophia uses ChatScript.

You can read about what ChatScript can do here.


  ChatScript keeps track of conversations with each user; can record
  where it is in a conversational flow and what facts it has learned
  about a user (you have to tell it what facts to try to learn). You can
  optionally keep logs of the conversations (either on a ChatScript
  server or locally on a freestanding device).