到问题和答案元组。 为了从给定的上下文中生成问题和答案,我们需要按照以下步骤操作: 1. 选择一个随机块并将其作为根上下文 2. 从向量数据库中检索 K 个相似的上下文 3. 将根上下文和其 K 个相邻上下文的文本连接起来以构建一个更大的上下文 4.使用这个大的上下文和 num_questions 在以下的提示模板中生成问题和答案
Your task is to formulate exactly { num_questions } questions from given context and provide the answer to each one.
End each question with a'?’character and then in a newline write the answer to
that question using only the context provided. Separate each question/answer pair by "XxX" Each question must start with "question:". Each answer must start with "answer:".
The question must satisfy the rules given below: 1.The question should make sense to humans even when read without the given context.| 2. The question should be fully answered from the given context. 3.The question should be framed from a part of context that contains important information. It can also be from tables, code, etc. 4.The answer to the question should not contain any links. 5.The question should be of moderate difficulty. 6. The question must be reasonable and must be understood and responded by humans.
7.Do no use phrases like 'provided context’,etc in the question 8.Avoid framing question using word "and" that can be decomposed into more than one
quest1on. 9. The question should not contain more than 10 words, make of use of abbreviation wherever possible.
context:{ context }
您的任务是根据给定的上下文提出{ num_questions }个问题,并给出每个问题的答案。
在每个问题的末尾加上”? 提供的上下文写出该问题的答案。 每个问题/答案之间用“XXX “隔开。 每个问题必须以 “question:”开头。 每个答案必须以“answer:”开头。
问题必须符合以下规则: 1.即使在没有给定上下文的情况下,问题也应该对人类有意义。