text_question_template = """\ Context information is below. --------------------- {context_str} --------------------- Given the context information and not prior knowledge. generate only questions based on the below query. Questions should be numbered on each line. {query_str} """ RagDatasetGenerator.from_documents(..., text_question_template=text_question_template)