How to generate a dataset for question answering from books (like Facebook's bAbI)?
If you are talking about "generating" in the sense of generative models , it is pretty tough. since we are still far beyond understanding the actual structure of question-answering.

And even state of the art methods for question answering are also not able to score well on datasets like babi , mostly 16 out of 20 tasks can be solved.