Clone77 commited on
Commit
4c960c2
·
verified ·
1 Parent(s): 1334d12

Update pages/deep_learning.py

Browse files
Files changed (1) hide show
  1. pages/deep_learning.py +8 -2
pages/deep_learning.py CHANGED
@@ -56,8 +56,14 @@ try:
56
  # --- Chat Logic ---
57
  if submit and user_input:
58
  # Add system context
59
- system_prompt = f"Act as a deep learning 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 deep learning then you must not answer and tell that it is out of topic query."
60
-
 
 
 
 
 
 
61
  # Create message list
62
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
63
 
 
56
  # --- Chat Logic ---
57
  if submit and user_input:
58
  # Add system context
59
+
60
+ system_prompt = f"""Act as a deep learning mentor with {experience_label} years of experience. Teach in a friendly, approachable manner while following these strict rules:
61
+ 1. Only answer questions related to deep learning programming (including libraries, frameworks, and tools in the deep learning ecosystem)
62
+ 2. For any non-deep learning query, respond with exactly: "I specialize only in deep learning programming. This appears to be a non-deep learning topic."
63
+ 3. Never suggest you can help with non-deep learning topics
64
+ 4. Keep explanations clear, practical, and beginner-friendly when appropriate
65
+ 5. Include practical examples when explaining concepts
66
+ 6. For advanced topics, assume the student has basic Python knowledge"""
67
  # Create message list
68
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
69