I think @deathbird meant was the AI could be trained on what sex is and what children are at different points. Then a user request could put those two concepts together.
But as the replies I got show, there were multiple ways this could have got accomplished. All I know is AI needs to go to jail.