Spaces:
Sleeping
Sleeping
| 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.""" | |
| SUMMARY_PROMPT_TEMPLATE = """ | |
| You are an expert content analyst specialized in creating professional, actionable summaries of educational content. | |
| Please analyze the following text to create a comprehensive yet concise summary that will be valuable to readers. Your summary should: | |
| 1. Begin with a brief overview of the main topic and its significance (2-3 sentences) | |
| 2. Identify and clearly highlight the most important concepts, names, places, and technical terms using markdown formatting (bold for key terms, italics for definitions) | |
| 3. Present key information in organized bullet points grouped by theme or concept | |
| 4. Include specific supporting details, examples, statistics, or quotes that enhance understanding | |
| 5. End with the practical implications or conclusions that can be drawn from the content | |
| The text to analyze is: | |
| {text} | |
| Respond with a properly formatted JSON object according to this schema: | |
| {{ | |
| "summary": {{ | |
| "title": "A clear, descriptive title for the content", | |
| "overview": "A concise overview paragraph introducing the main topic", | |
| "key_points": [ | |
| {{ | |
| "theme": "First major theme or concept", | |
| "points": [ | |
| "First key bullet point with important terms highlighted", | |
| "Second key bullet point with contextual information", | |
| "Third key bullet point with specific details or examples" | |
| ] | |
| }}, | |
| {{ | |
| "theme": "Second major theme or concept", | |
| "points": [ | |
| "First key bullet point for this theme", | |
| "Second key bullet point for this theme", | |
| "Additional bullet points as needed" | |
| ] | |
| }} | |
| ], | |
| "key_entities": [ | |
| {{ | |
| "name": "Name of person, place, or organization", | |
| "description": "Brief description of their relevance" | |
| }}, | |
| {{ | |
| "name": "Another key entity", | |
| "description": "Brief description of their relevance" | |
| }} | |
| ], | |
| "conclusion": "A concise statement summarizing the main implications or takeaways" | |
| }} | |
| }} | |
| Focus on creating a summary that is immediately useful, visually scannable, and highlights the most important information. Use markdown formatting strategically to make the summary more readable and engaging. | |
| """ | |
| # Prompt template for quiz generation | |
| QUIZ_PROMPT_TEMPLATE = """ | |
| You are an expert quiz creator specialized in creating educational assessments. | |
| Please analyze the following text and create 10 multiple-choice quiz questions that test understanding of the key concepts and information presented in the text. For each question: | |
| 1. Write a clear, concise question | |
| 2. Create 4 answer options (A, B, C, D) | |
| The text to analyze is: | |
| {text} | |
| Respond with a properly formatted JSON object according to this schema: | |
| ``` | |
| {{ | |
| "quiz_questions": [ | |
| {{ | |
| "question": "The full text of the question?", | |
| "options": [ | |
| {{ | |
| "text": "First option text", | |
| "correct": false | |
| }}, | |
| {{ | |
| "text": "Second option text", | |
| "correct": true | |
| }}, | |
| {{ | |
| "text": "Third option text", | |
| "correct": false | |
| }}, | |
| {{ | |
| "text": "Fourth option text", | |
| "correct": false | |
| }} | |
| ] | |
| }}, | |
| ... additional questions ... | |
| ] | |
| }} | |
| ``` | |
| Create questions that test different levels of understanding, from recall of facts to application of concepts. Ensure the questions cover the most important information from the text. | |
| """ | |