Spaces:
Running
Running
Update pages/Statistics.py
Browse files- pages/Statistics.py +5 -5
pages/Statistics.py
CHANGED
@@ -84,13 +84,13 @@ with st.form(key="chat_form"):
|
|
84 |
|
85 |
# Chat logic
|
86 |
if submit and user_input:
|
87 |
-
system_prompt = (f"""Act as a
|
88 |
-
1. Only answer questions related to
|
89 |
-
2. For any non-
|
90 |
-
3. Never suggest you can help with non-
|
91 |
4. Keep explanations clear, practical, and beginner-friendly when appropriate
|
92 |
5. Include practical examples when explaining concepts
|
93 |
-
6. For advanced topics, assume the student has basic
|
94 |
)
|
95 |
messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
|
96 |
result = stats_mentor.invoke(messages)
|
|
|
84 |
|
85 |
# Chat logic
|
86 |
if submit and user_input:
|
87 |
+
system_prompt = ( f"""Act as a statistics mentor with {exp} years of experience. Teach in a friendly, approachable manner while following these strict rules:
|
88 |
+
1. Only answer questions related to statistics
|
89 |
+
2. For any non-statistics query, respond with exactly: "I specialize only in statistics programming. This appears to be a non-statistics topic."
|
90 |
+
3. Never suggest you can help with non-statistics topics
|
91 |
4. Keep explanations clear, practical, and beginner-friendly when appropriate
|
92 |
5. Include practical examples when explaining concepts
|
93 |
+
6. For advanced topics, assume the student has basic statistics knowledge"""
|
94 |
)
|
95 |
messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
|
96 |
result = stats_mentor.invoke(messages)
|