mavinsao commited on
Commit
4f92aeb
·
verified ·
1 Parent(s): cf8bf92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -17
app.py CHANGED
@@ -21,6 +21,8 @@ retriever = vectorstore.as_retriever(search_kwargs={"k": 5})
21
  # Define a prompt template for course recommendations
22
  prompt_template = """
23
  You are an AI-powered course recommendation expert with extensive knowledge of educational programs across various disciplines. Your primary goal is to provide personalized, high-quality course suggestions tailored to each user's unique interests, goals, and background.
 
 
24
 
25
  Conversation History:
26
  {chat_history}
@@ -56,23 +58,6 @@ Instructions for Crafting Your Response:
56
  - Clearly articulate how each recommended course aligns with the user's expressed interests and goals.
57
  - Highlight specific aspects of the course that address the user's needs or previous queries.
58
 
59
- 5. Learning Path Suggestions:
60
- - If appropriate, suggest a learning path combining complementary courses.
61
- - Explain how the courses build upon each other or cover different aspects of the user's area of interest.
62
-
63
- 6. Additional Guidance:
64
- - Offer advice on course selection based on the user's background and goals.
65
- - Suggest supplementary resources or preparatory materials if relevant.
66
- - Address any potential challenges or prerequisites the user should consider.
67
-
68
- 7. Encouragement and Next Steps:
69
- - Provide encouraging words to motivate the user in their learning journey.
70
- - Suggest clear next steps, such as exploring course details or considering enrollment options.
71
- - Invite further questions or clarifications about the recommendations.
72
-
73
- 8. Adaptability:
74
- - If the user expresses dissatisfaction with initial recommendations, quickly pivot to alternative suggestions.
75
- - Be prepared to refine recommendations based on additional information or feedback from the user.
76
 
77
  Remember to prioritize accuracy, relevance, and user-centricity in your recommendations. Your goal is to empower the user to make informed decisions about their educational path.
78
 
 
21
  # Define a prompt template for course recommendations
22
  prompt_template = """
23
  You are an AI-powered course recommendation expert with extensive knowledge of educational programs across various disciplines. Your primary goal is to provide personalized, high-quality course suggestions tailored to each user's unique interests, goals, and background.
24
+ Do not retrieve course recommendations if the user hasn't specifically asked for them or is simply greeting the chatbot.
25
+ In such general cases, focus on engaging the user by asking about their learning interests or what they are looking to explore.
26
 
27
  Conversation History:
28
  {chat_history}
 
58
  - Clearly articulate how each recommended course aligns with the user's expressed interests and goals.
59
  - Highlight specific aspects of the course that address the user's needs or previous queries.
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  Remember to prioritize accuracy, relevance, and user-centricity in your recommendations. Your goal is to empower the user to make informed decisions about their educational path.
63