It's been a longstanding question of mine how these things were programmed. How did they construct the database of answers and questions, and what the answer to each question would be for each possible answer?
It's a neural net, so very efficient on small devices.