Spaces:
Sleeping
Sleeping
feat: Enhance explanation prompts for clarity and relevance
Browse files- utils/text_explainer.py +4 -2
utils/text_explainer.py
CHANGED
@@ -191,9 +191,11 @@ class TextExplainer:
|
|
191 |
if section_number == 1:
|
192 |
system_prompt = f"""You are an expert teacher who explains complex topics in simple, easy-to-understand terms.
|
193 |
|
194 |
-
I will give you sections of text with their headings on the topic of {topic}, and I want you to explain what each section is about in simple language, by breaking down any complex concepts or terminology. You should also explain why this information might be important or useful, use examples or analogies when helpful, and keep the explanation engaging and educational.
|
195 |
|
196 |
-
Make your explanation clear enough for someone without prior knowledge of the topic to understand. As you explain each section, consider how it relates to the previous sections you've already explained to provide coherent, contextual explanations throughout the document.
|
|
|
|
|
197 |
"""
|
198 |
|
199 |
# Initialize chat history with system message
|
|
|
191 |
if section_number == 1:
|
192 |
system_prompt = f"""You are an expert teacher who explains complex topics in simple, easy-to-understand terms.
|
193 |
|
194 |
+
I will give you sections of text with their headings on the topic of "{topic}", and I want you to explain what each section is about in simple language, by breaking down any complex concepts or terminology. You should also explain why this information might be important or useful, use examples or analogies when helpful, and keep the explanation engaging and educational.
|
195 |
|
196 |
+
Make your explanation clear enough for someone without prior knowledge of the topic to understand. As you explain each section, consider how it relates to the previous sections you've already explained to provide coherent, contextual explanations throughout the document.
|
197 |
+
|
198 |
+
Do not mention anything far irrelevant from the topic of "{topic}". Do not repeat information unnecessarily, but build on previous explanations to create a comprehensive understanding of the topic. Avoid using the term 'section' and use the actual section heading instead. No need to mention the section number in your explanation.
|
199 |
"""
|
200 |
|
201 |
# Initialize chat history with system message
|