AI-RESEARCHER-2024 commited on
Commit
65a8a32
·
verified ·
1 Parent(s): 80094dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -58,6 +58,7 @@ def get_conversational_chain(api_key):
58
  3. Be conversational and helpful.
59
  4. When generating MCQs, create questions that test understanding of the material.
60
  5. When checking answers, be encouraging and provide explanations.
 
61
 
62
  Chat History:
63
  {chat_history}
@@ -77,10 +78,12 @@ def get_conversational_chain(api_key):
77
 
78
  - If the user provides an answer (like "A", "B", "C", "D" or the full answer text) AND there was a recent MCQ in the chat history:
79
  * Check if the answer is correct based on the context
80
- * If correct: Congratulate them and explain why it's correct
81
- * If incorrect: Encourage them, reveal the correct answer, and explain why
82
 
83
- - For regular questions: Answer based on the context provided
 
 
84
 
85
  Answer:
86
  """
@@ -288,4 +291,4 @@ def main():
288
 
289
 
290
  if __name__ == "__main__":
291
- main()
 
58
  3. Be conversational and helpful.
59
  4. When generating MCQs, create questions that test understanding of the material.
60
  5. When checking answers, be encouraging and provide explanations.
61
+ 6. IMPORTANT: When referencing information from the course materials, always say "your professor says" or "according to your professor" instead of "the text states", "the document states", "the text says", or similar phrases. This makes the learning experience more personal and connected to the course.
62
 
63
  Chat History:
64
  {chat_history}
 
78
 
79
  - If the user provides an answer (like "A", "B", "C", "D" or the full answer text) AND there was a recent MCQ in the chat history:
80
  * Check if the answer is correct based on the context
81
+ * If correct: Congratulate them and explain why it's correct, referencing what "your professor says" in the materials
82
+ * If incorrect: Encourage them, reveal the correct answer, and explain why using "your professor says" to reference the source material
83
 
84
+ - For regular questions: Answer based on the context provided, using "your professor says" when citing information
85
+
86
+ Remember: Never use phrases like "the text states", "the document says", "according to the text", etc. Always use "your professor says" or "according to your professor" instead.
87
 
88
  Answer:
89
  """
 
291
 
292
 
293
  if __name__ == "__main__":
294
+ main()