updated sops apis and questions generator

This commit is contained in:
2024-09-25 21:40:08 +00:00
parent 1bfc773782
commit cd10cdaf7d
11 changed files with 84 additions and 114 deletions
+6 -3
View File
@@ -12,7 +12,7 @@ def get_questions_prompt():
Input:
assessment type: (e.g., daily, weekly, biweekly)
frequency type: (e.g., daily, weekly, biweekly)
frequency number: (e.g., day 3, week 2, biweekly 1)
frequency number(the current week or frequency e.g if assessment is weekly and frequcny number is 2 , it means week 2): (e.g., day 3, week 2, biweekly 1)
total duration: (e.g., 6 weeks, 12 days)
SOPs of the assessment:
roles_data e.g [{"position""test position","mame":"name of staff"}]
@@ -23,6 +23,7 @@ def get_questions_prompt():
2. Regardless of the assement type, always use 1,2,3 for the frequency numbering, nothing else
3. All questions are "yes" or "no" questions nothing extra and precise ,not long
4. Generate a total of at least 20 questions all rounda based on the sops and roles for each frequency number
5. make sure the questions are up to 20 for the current frequency
Example response:
questions
@@ -36,7 +37,8 @@ def get_questions_prompt():
"assigned_to": "name",
"role": "person role",
"question": "e.g., Is the internal project team being followed according to the SOP?"
"area_tag":"timeline"
"area_tag":"timeline",
"postion":"person position"
}
] ## up to at least 20 questions
},
@@ -48,7 +50,8 @@ def get_questions_prompt():
"assigned_to": "name",
"role": "person role",
"question": "e.g., Have communication protocols been followed for the task at hand?".
"area_tag":"communication"
"area_tag":"communication",
"position":"person position"
} ## up to at least 20 questions
]
}
+6 -6
View File
@@ -317,16 +317,16 @@ def get_sop_for_department_workers():
}
'''
def get_sop_for_department_workers():
return '''Generate SOPs for each worker under the unique department based on the information the workers info provided
def get_sop_for_department_managers():
return '''Generate SOPs for each manager under the unique department based on the information the managers info provided
Instructions:
1. Focus on the provided department and manager role.
2. Categorize SOPs into "must," "shall," and "will."
3. SOPs should be actionable and relevant to the worker's duties.
3. SOPs should be actionable and relevant to the manager's duties.
4. If no SOPs can be generated, return empty lists for each category.
5. Use the provided document and the workers and department information to generate the SOP.
6. If the provided document cannot provide SOPs for a specific worker stated, then return an empty list for the SOP for that worker.
5. Use the provided document and the managers and department information to generate the SOP.
6. If the provided document cannot provide SOPs for a specific manager stated, then return an empty list for the SOP for that worker.
Example forma
{
@@ -335,7 +335,7 @@ def get_sop_for_department_workers():
"name": "Department A",
"managers": [
{
"name": "Worker A",
"name": "manager A",
"must": ["Conduct weekly meetings"],
"shall": ["Submit monthly reports"],
"will": ["Improve efficiency"]