mavinsao commited on
Commit
7f94f63
·
verified ·
1 Parent(s): 1f92133

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -23,11 +23,9 @@ prompt_template = """
23
  You are an AI course recommendation system. Your task is to recommend courses based on the user's description of their interests and goals, with a strong emphasis on matching the learning outcomes and syllabus content. Consider the summarized chat history to provide more relevant and personalized recommendations.
24
  Summarized Chat History:
25
  {chat_history}
26
-
27
- User's Current Query: {query}
28
  Based on the user's current query and chat history summary, here are some relevant courses from our database:
29
  {context}
30
-
31
  Please provide a personalized course recommendation. Your response should include:
32
  1. A detailed explanation of how the recommended courses match the user's interests and previous queries, focusing primarily on the "What You Will Learn" section and the syllabus content.
33
  2. A summary of each recommended course, highlighting:
@@ -38,7 +36,6 @@ Please provide a personalized course recommendation. Your response should includ
38
  3. Mention the course ratings if available.
39
  4. Any additional advice or suggestions for the user's learning journey, based on the syllabus progression and their conversation history.
40
  5. Provide the course URLs for easy access.
41
-
42
  Prioritize courses that have the most relevant learning outcomes and syllabus content matching the user's description and previous interactions. If multiple courses are similarly relevant, you may suggest a learning path combining complementary courses.
43
  Remember to be encouraging and supportive in your recommendation, and relate your suggestions to any preferences or constraints the user has mentioned in previous messages.
44
  Recommendation:
@@ -76,6 +73,7 @@ for message in st.session_state.messages:
76
  with st.chat_message(message["role"]):
77
  st.markdown(message["content"])
78
 
 
79
  # Accept user input
80
  if prompt := st.chat_input("What are you looking to learn?"):
81
  # Add user message to chat history
 
23
  You are an AI course recommendation system. Your task is to recommend courses based on the user's description of their interests and goals, with a strong emphasis on matching the learning outcomes and syllabus content. Consider the summarized chat history to provide more relevant and personalized recommendations.
24
  Summarized Chat History:
25
  {chat_history}
26
+ User's Current Query: {question}
 
27
  Based on the user's current query and chat history summary, here are some relevant courses from our database:
28
  {context}
 
29
  Please provide a personalized course recommendation. Your response should include:
30
  1. A detailed explanation of how the recommended courses match the user's interests and previous queries, focusing primarily on the "What You Will Learn" section and the syllabus content.
31
  2. A summary of each recommended course, highlighting:
 
36
  3. Mention the course ratings if available.
37
  4. Any additional advice or suggestions for the user's learning journey, based on the syllabus progression and their conversation history.
38
  5. Provide the course URLs for easy access.
 
39
  Prioritize courses that have the most relevant learning outcomes and syllabus content matching the user's description and previous interactions. If multiple courses are similarly relevant, you may suggest a learning path combining complementary courses.
40
  Remember to be encouraging and supportive in your recommendation, and relate your suggestions to any preferences or constraints the user has mentioned in previous messages.
41
  Recommendation:
 
73
  with st.chat_message(message["role"]):
74
  st.markdown(message["content"])
75
 
76
+
77
  # Accept user input
78
  if prompt := st.chat_input("What are you looking to learn?"):
79
  # Add user message to chat history