this is my templates
`prompt_template_questions = “””
You are an expert in creating practice questions based on study material.
Your goal is to prepare a student for their exam. You do this by asking questions that can help students understanding the text below.
Please make sure to use same words that are existe in the text below:
{text}
Create questions that will prepare the student for their exam. Make sure not to lose any important information.
QUESTIONS:
“””
refine_template_questions = “””
You are an expert in creating practice questions based on study material. Your goal is to help a student prepare for an exam.
We have received some practice questions to a certain extent: {existing_answer}.
We have the option to refine the existing questions or add new ones. (only if necessary) with some more context below.
{text}
Given the new context, refine the original questions in English.
If the context is not helpful, please provide the original questions.
QUESTIONS:
“””`
and this is the uses of this two templates
`PROMPT_TEMPLATE = PromptTemplate(template=PromptTemplates.prompt_template_questions, input_variables=[“text”])
REFINE_PROMPT_TEMPLATE = PromptTemplate(template=PromptTemplates.refine_template_questions, input_variables=["text", "existing_answer"])
ques_gen_chain = load_summarize_chain(
llm = llm_generation,
chain_type = "refine",
verbose = True,
question_prompt=PROMPT_TEMPLATE,
refine_prompt=REFINE_PROMPT_TEMPLATE
)
ques = ques_gen_chain.run(document_question_gen)`
my question is how can i add more input variables to this tempates.
i want to specify the number of questions and target or context of the text input to help LLM to generate a good questions.
Hamza Moumad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.