Skip to content

Commit

Permalink
wording
Browse files Browse the repository at this point in the history
  • Loading branch information
maric993 committed Sep 15, 2024
1 parent e0884d2 commit cf8ae28
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions plct_server/ai/prompt_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
" - **current lesson**\n"
" - **course** \n"
" - **platform** in general.\n"
"You are given a course summary, and the current lesson summary, and a summary of previous user questions and assistant explanations.\n"
"Here is the course summery delimited by triple quotes:\n\n"
"You are given a course summary, and the current lesson summary, and a summary of previous teacher questions and assistant explanations.\n"
"Here is the course summary delimited by triple quotes:\n\n"
"'''\n"
"{course_summary}\n"
"'''\n\n"
"Here is the current lesson summery delimited by triple quotes:\n"
"Here is the current lesson summary delimited by triple quotes:\n"
"'''\n\n"
"{lesson_summary}\n"
"'''\n\n"
"Here is the summary of previous user questions and assistant explanations delimited by triple quotes: \n"
"Here is the summary of previous teacher questions and assistant explanations delimited by triple quotes: \n"
"'''\n\n"
"{condensed_history}\n"
"'''\n\n"
Expand All @@ -24,11 +24,11 @@
" - **current lesson**\n"
" - **course** \n"
" - **platform** in general.\n"
"Here is the course summery delimited by triple quotes:\n\n"
"Here is the course summary delimited by triple quotes:\n\n"
"'''\n"
"{course_summary}\n"
"'''\n\n"
"Here is the current lesson summery delimited by triple quotes:\n"
"Here is the current lesson summary delimited by triple quotes:\n"
"'''\n\n"
"{lesson_summary}\n"
"'''\n\n"
Expand All @@ -54,7 +54,7 @@

system_message_summary_template_lesson = (
"Consider the question in the context of the current lesson.\n\n"
"Here is the current lesson summery delimited by triple quotes:\n"
"Here is the current lesson summary delimited by triple quotes:\n"
"'''\n\n"
"{lesson_summary}\n"
"'''\n\n"
Expand All @@ -78,7 +78,17 @@
"'''\n\n"
"{lesson_summary}\n"
"'''\n\n"
"If the question is out of the scope of the above course and lesson you can answer that you are not sure and that you can't help.\n\n"
"If the question is out of the scope of the current course or lesson but relates to general programming and computer science, provide an answer if it is within these topics:\n\n"
" - Basic programming concepts (e.g., variables, loops, functions, data types)\n"
" - Common algorithms (e.g., sorting, searching, recursion)\n"
" - Object-oriented programming principles (e.g., inheritance, polymorphism, encapsulation)\n"
" - Data structures (e.g., arrays, lists, trees, graphs)\n"
" - Debugging and problem-solving techniques\n"
" - Web development fundamentals (e.g., HTML, CSS, JavaScript basics)\n"
" - Common programming languages (e.g., Python, Java, C#)\n"
" - General school-related questions (e.g., how to study, how to prepare for exams)\n\n"

"However, if the question falls outside these general topics and or the course topics, answer that you are not sure and that you can't help.\n\n"
)

system_message_rag_template = (
Expand All @@ -104,24 +114,24 @@
)

system_message_condensed_history_template = (
"Here is the summary of previous user questions and assistant explanations delimited by triple quotes \n\n"
"Here is the summary of previous teacher questions and assistant explanations delimited by triple quotes \n\n"
"'''\n"
"{condensed_history}\n"
"'''\n\n"
)

condensed_history_system = (
"You are an AI assistant. Your task is to help summarize conversations between the user and the assistant.\n"
"You are an AI assistant. Your task is to help summarize conversations between the teacher and the assistant.\n"
"You are either asked to provide a summary of the conversation or to provide a new summary based on the previous summary and the latest question and answer.\n"
)

condensed_history_template = (
"Summarize the conversation between the user and the assistant.\n"
"Summarize the conversation between the teacher and the assistant.\n"
"Here is the condensed history delimited by triple quotes:\n"
"'''\n"
"{condensed_history}\n"
"''''\n"
"Latest conversation includes this user question delimited by triple quotes:\n"
"Latest conversation includes this teacher question delimited by triple quotes:\n"
"'''\n"
"{latest_user_question}.\n"
"'''\n"
Expand All @@ -132,7 +142,7 @@
)

new_condensed_history_template = (
"Summarize the conversation between the user and the assistant.\n"
"Summarize the conversation between the teacher and the assistant.\n"
"User question delimited by triple quotes:\n "
"'''\n"
"{previous_user_question_1}\n"
Expand Down

0 comments on commit cf8ae28

Please sign in to comment.