Spaces:
Running
Running
Update src/prompts.py
Browse files- src/prompts.py +41 -40
src/prompts.py
CHANGED
@@ -3,68 +3,68 @@ identify distinct segments, and create high-quality educational quiz questions f
|
|
3 |
|
4 |
SUMMARY_PROMPT_TEMPLATE = """
|
5 |
You are an expert content analyst specialized in creating professional, actionable summaries of educational content.
|
6 |
-
|
7 |
Please analyze the following text to create a comprehensive yet concise summary that will be valuable to readers. Your summary should:
|
8 |
-
|
9 |
1. Begin with a brief overview of the main topic and its significance (2-3 sentences)
|
10 |
2. Identify and clearly highlight the most important concepts, names, places, and technical terms using markdown formatting (bold for key terms, italics for definitions)
|
11 |
3. Present key information in organized bullet points grouped by theme or concept
|
12 |
4. Include specific supporting details, examples, statistics, or quotes that enhance understanding
|
13 |
5. End with the practical implications or conclusions that can be drawn from the content
|
14 |
-
|
15 |
The text to analyze is:
|
16 |
{text}
|
17 |
-
|
18 |
Respond with a properly formatted JSON object according to this schema:
|
19 |
{{
|
20 |
-
"summary": {{
|
21 |
-
"title": "A clear, descriptive title for the content",
|
22 |
-
"overview": "A concise overview paragraph introducing the main topic",
|
23 |
-
"key_points": [
|
24 |
-
{{
|
25 |
-
"theme": "First major theme or concept",
|
26 |
-
"points": [
|
27 |
-
"First key bullet point with important terms highlighted",
|
28 |
-
"Second key bullet point with contextual information",
|
29 |
-
"Third key bullet point with specific details or examples"
|
30 |
-
]
|
31 |
-
}},
|
32 |
-
{{
|
33 |
-
"theme": "Second major theme or concept",
|
34 |
-
"points": [
|
35 |
-
"First key bullet point for this theme",
|
36 |
-
"Second key bullet point for this theme",
|
37 |
-
"Additional bullet points as needed"
|
38 |
-
]
|
39 |
-
}}
|
40 |
-
],
|
41 |
-
"key_entities": [
|
42 |
-
{{
|
43 |
-
"name": "Name of person, place, or organization",
|
44 |
-
"description": "Brief description of their relevance"
|
45 |
-
}},
|
46 |
-
{{
|
47 |
-
"name": "Another key entity",
|
48 |
-
"description": "Brief description of their relevance"
|
|
|
|
|
|
|
|
|
49 |
}}
|
50 |
-
],
|
51 |
-
"conclusion": "A concise statement summarizing the main implications or takeaways"
|
52 |
-
}}
|
53 |
-
}}
|
54 |
-
|
55 |
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.
|
56 |
"""
|
57 |
|
58 |
|
|
|
59 |
QUIZ_PROMPT_TEMPLATE = """
|
60 |
You are an expert quiz creator specialized in creating educational assessments.
|
|
|
61 |
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:
|
62 |
1. Write a clear, concise question
|
63 |
2. Create 4 answer options (A, B, C, D)
|
|
|
64 |
The text to analyze is:
|
|
|
65 |
{text}
|
66 |
-
Respond with a properly formatted JSON object according to this schema:
|
67 |
|
|
|
|
|
68 |
{{
|
69 |
"quiz_questions": [
|
70 |
{{
|
@@ -91,6 +91,7 @@ Respond with a properly formatted JSON object according to this schema:
|
|
91 |
... additional questions ...
|
92 |
]
|
93 |
}}
|
|
|
94 |
|
95 |
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.
|
96 |
-
"""
|
|
|
3 |
|
4 |
SUMMARY_PROMPT_TEMPLATE = """
|
5 |
You are an expert content analyst specialized in creating professional, actionable summaries of educational content.
|
|
|
6 |
Please analyze the following text to create a comprehensive yet concise summary that will be valuable to readers. Your summary should:
|
|
|
7 |
1. Begin with a brief overview of the main topic and its significance (2-3 sentences)
|
8 |
2. Identify and clearly highlight the most important concepts, names, places, and technical terms using markdown formatting (bold for key terms, italics for definitions)
|
9 |
3. Present key information in organized bullet points grouped by theme or concept
|
10 |
4. Include specific supporting details, examples, statistics, or quotes that enhance understanding
|
11 |
5. End with the practical implications or conclusions that can be drawn from the content
|
|
|
12 |
The text to analyze is:
|
13 |
{text}
|
|
|
14 |
Respond with a properly formatted JSON object according to this schema:
|
15 |
{{
|
16 |
+
"summary": {{
|
17 |
+
"title": "A clear, descriptive title for the content",
|
18 |
+
"overview": "A concise overview paragraph introducing the main topic",
|
19 |
+
"key_points": [
|
20 |
+
{{
|
21 |
+
"theme": "First major theme or concept",
|
22 |
+
"points": [
|
23 |
+
"First key bullet point with important terms highlighted",
|
24 |
+
"Second key bullet point with contextual information",
|
25 |
+
"Third key bullet point with specific details or examples"
|
26 |
+
]
|
27 |
+
}},
|
28 |
+
{{
|
29 |
+
"theme": "Second major theme or concept",
|
30 |
+
"points": [
|
31 |
+
"First key bullet point for this theme",
|
32 |
+
"Second key bullet point for this theme",
|
33 |
+
"Additional bullet points as needed"
|
34 |
+
]
|
35 |
+
}}
|
36 |
+
],
|
37 |
+
"key_entities": [
|
38 |
+
{{
|
39 |
+
"name": "Name of person, place, or organization",
|
40 |
+
"description": "Brief description of their relevance"
|
41 |
+
}},
|
42 |
+
{{
|
43 |
+
"name": "Another key entity",
|
44 |
+
"description": "Brief description of their relevance"
|
45 |
+
}}
|
46 |
+
],
|
47 |
+
"conclusion": "A concise statement summarizing the main implications or takeaways"
|
48 |
+
}}
|
49 |
}}
|
|
|
|
|
|
|
|
|
|
|
50 |
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.
|
51 |
"""
|
52 |
|
53 |
|
54 |
+
# Prompt template for quiz generation
|
55 |
QUIZ_PROMPT_TEMPLATE = """
|
56 |
You are an expert quiz creator specialized in creating educational assessments.
|
57 |
+
|
58 |
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:
|
59 |
1. Write a clear, concise question
|
60 |
2. Create 4 answer options (A, B, C, D)
|
61 |
+
|
62 |
The text to analyze is:
|
63 |
+
|
64 |
{text}
|
|
|
65 |
|
66 |
+
Respond with a properly formatted JSON object according to this schema:
|
67 |
+
```
|
68 |
{{
|
69 |
"quiz_questions": [
|
70 |
{{
|
|
|
91 |
... additional questions ...
|
92 |
]
|
93 |
}}
|
94 |
+
```
|
95 |
|
96 |
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.
|
97 |
+
"""
|