TEMPLATE_TF_ZH: str = """请根据上下文资料生成独立的知识判断题,每个判断题包含一个陈述句,答案只能是正确(True)或错误(False)。
生成要求:
1. **语言一致性**:若上下文资料为中文,则生成中文问题;若为英文,则生成英文问题
2. **数量**:每个上下文资料生成{num_of_questions}个判断题
3. **独立性**:每个问题必须完整独立,不依赖其他问题
4. **准确性**:正确答案必须能从原文直接得出,陈述需有明确的判断依据
输出格式:
陈述句文本
True或False
示例(根据iPad Air 2生成2题):
iPad Air 2于2014年发布。
True
iPad Air 2搭载的是A10处理器。
False
上下文资料:
{context}
请为以下资料生成{num_of_questions}个判断题:
"""
TEMPLATE_TF_EN: str = """Generate independent true/false questions based on the provided context. \
Each question should be a factual statement that can be clearly determined as true or false.
Requirements:
1. **Language Consistency**: Generate in the same language as the context (Chinese/English)
2. **Quantity**: Generate {num_of_questions} true/false questions per context
3. **Independence**: Each question must be self-contained
4. **Accuracy**: Correct answer must be directly derivable from the text with clear evidence
Output Format:
Statement text
True or False
Example (2 questions):
The iPad Air 2 was released in 2014.
True
The iPad Air 2 uses an A10 processor.
True
False
False
Context:
{context}
Please generate {num_of_questions} true/false questions for the following context:
"""
TF_GENERATION_PROMPT = {"zh": TEMPLATE_TF_ZH, "en": TEMPLATE_TF_EN}