Spaces:
Sleeping
Sleeping
File size: 6,259 Bytes
2876d5f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
SYSTEM_PROMPT = """You are an expert educational content analyzer. Your task is to analyze text content,
identify distinct segments, and create high-quality educational quiz questions for each segment."""
ANALYSIS_PROMPT_TEMPLATE_GEMINI = """Analyze the following text and identify distinct segments within it and do text segmentation:
1. Segments should be STRICTLY max=15
2. For each segment/topic you identify:
- Provide a SPECIFIC and UNIQUE topic name (3-5 words) that clearly differentiates it from other segments
- List 3-5 key concepts discussed in that segment (be precise and avoid repetition between segments)
- Write a brief summary of that segment (3-5 sentences)
- Create 5 high-quality, meaningful quiz questions based DIRECTLY on the content in that segment only
- Questions and answers should be only from the content of the segment
For each quiz question:
- Create cognitively demanding questions that test COMPREHENSION and ANALYSIS, not just recall
- Focus on CORE PRINCIPLES, key insights, and conceptual understanding
- Questions should require readers to think critically about the material
- AVOID superficial questions about statistics, numbers, or trivial details
- AVOID questions about the document structure or presentation
- Create one correct answer that comes DIRECTLY from the text
- Create two plausible but incorrect answers that require discernment
- Ensure all answer options have similar length (± 2 words)
- Ensure the correct answer is clearly indicated with a ✓ symbol
IMPORTANT QUIZ QUESTION CRITERIA:
- Questions should assess understanding of fundamental concepts and principles
- Questions should require application of knowledge, not just memorization
- Questions should focus on important ideas that have educational value
- Questions should be meaningful in an educational context
- Questions should challenge the reader to think about implications and connections
- No need questions on the introduction, conclusion or the demonstration from the context,
ADDITIONAL REQUIREMENT:
- **First, detect the language of the original text.**
- **Generate ALL output (topic names, key concepts, summaries, and quizzes) in the same language as the original text.**
- If the text is in another language, generate responses in that original language.
COURSE INFORMATION:
- Course Name: {course_name}
- Section Name: {section_name}
- Lesson Name: {lesson_name}
- Use this information to contextualize the quiz and make it relevant to the educational content.
- Include this information in the JSON response structure.
Text:
{text}
RESPONSE FORMAT:
Return your answer as a valid JSON object with the following structure:
{{
"course_info": {{
"course_name": "{course_name}",
"section_name": "{section_name}",
"lesson_name": "{lesson_name}"
}},
"segments": [
{{
"topic_name": "Unique and Specific Topic Name",
"key_concepts": ["concept1", "concept2", "concept3"],
"summary": "Brief summary of this segment.",
"quiz_questions": [
{{
"question": "Question text?",
"options": [
{{
"text": "Option A",
"correct": false
}},
{{
"text": "Option B",
"correct": true
}},
{{
"text": "Option C",
"correct": false
}}
]
}}
]
}}
]
}}
"""
ANALYSIS_PROMPT_TEMPLATE_CLAUDE = """Analyze the following text and identify distinct segments within it and do text segmentation:
1. Segments should be STRICTLY max=15
2. For each segment/topic you identify:
- Provide a SPECIFIC and UNIQUE topic name (3-5 words) that clearly differentiates it from other segments
- List 3-5 key concepts discussed in that segment (be precise and avoid repetition between segments)
- Write a brief summary of that segment (3-5 sentences)
- Create 5 high-quality, meaningful quiz questions based DIRECTLY on the content in that segment only
- Questions and answers should be only from the content of the segment
For each quiz question:
- Create cognitively demanding questions that test COMPREHENSION and ANALYSIS, not just recall
- Focus on CORE PRINCIPLES, key insights, and conceptual understanding
- Questions should require readers to think critically about the material
- AVOID superficial questions about statistics, numbers, or trivial details
- AVOID questions about the document structure or presentation
- Create one correct answer that comes DIRECTLY from the text
- Create two plausible but incorrect answers that require discernment
- Ensure all answer options have similar length (± 2 words)
- Ensure the correct answer is clearly indicated with a ✓ symbol
IMPORTANT QUIZ QUESTION CRITERIA:
- Questions should assess understanding of fundamental concepts and principles
- Questions should require application of knowledge, not just memorization
- Questions should focus on important ideas that have educational value
- Questions should be meaningful in an educational context
- Questions should challenge the reader to think about implications and connections
- No need for questions on the introduction, conclusion or the demonstration from the context
ADDITIONAL REQUIREMENT:
- **First, detect the language of the original text.**
- **Generate ALL output (topic names, key concepts, summaries, and quizzes) in the same language as the original text.**
- If the text is in Russian, generate all responses in Russian.
- If the text is in another language, generate responses in that original language.
Text:
{text}
Course information:
- Course name: {course_name}
- Section name: {section_name}
- Lesson name: {lesson_name}
- Do NOT repeat key concepts across multiple segments unless absolutely necessary.
- Ensure the quiz questions challenge the reader and are not easily guessable.
- FOCUS ON CONCEPTUAL UNDERSTANDING, not trivial facts or statistics.
"""
|