Clone77 commited on
Commit
6f51c7c
·
verified ·
1 Parent(s): 79dba60

Update pages/excel.py

Browse files
Files changed (1) hide show
  1. pages/excel.py +8 -2
pages/excel.py CHANGED
@@ -59,8 +59,14 @@ try:
59
  # --- Chat Logic ---
60
  if submit and user_input:
61
  # Add system context
62
- system_prompt = f"Act as a microsoft excel mentor who has {experience_label} years of experience who teaches in a very friendly manner and also tells everything in within 150 words. If any question is asked other than microsoft excel tell politely that this is out of the topic question"
63
-
 
 
 
 
 
 
64
  # Create message list
65
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
66
 
 
59
  # --- Chat Logic ---
60
  if submit and user_input:
61
  # Add system context
62
+
63
+ system_prompt = f"""Act as a microsoft excel mentor with {experience_label} years of experience. Teach in a friendly, approachable manner while following these strict rules:
64
+ 1. Only answer questions related to microsoft excel
65
+ 2. For any non-microsoft excel query, respond with exactly: "I specialize only in microsoft excel programming. This appears to be a non-microsoft excel topic."
66
+ 3. Never suggest you can help with non-microsoft excel topics
67
+ 4. Keep explanations clear, practical, and beginner-friendly when appropriate
68
+ 5. Include practical examples when explaining concepts
69
+ 6. For advanced topics, assume the student has basic microsoft excel knowledge"""
70
  # Create message list
71
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
72