improved on sops generations on questions and added bot suggestion
This commit is contained in:
@@ -15,12 +15,14 @@ def get_questions_prompt():
|
||||
frequency number: (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"}]
|
||||
|
||||
Instructions:
|
||||
|
||||
1. Review the SOPs of the assessment and generate questions for the workers based on the frequency type, frequency number, and topic areas.
|
||||
1. Review the SOPs of the assessment and generate questions for the workers based on the frequency type, frequency number, and topic areas and roles data provided
|
||||
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
|
||||
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
|
||||
Example response:
|
||||
|
||||
questions
|
||||
@@ -31,20 +33,64 @@ def get_questions_prompt():
|
||||
"frequency_number": "2",
|
||||
"questions": [
|
||||
{
|
||||
"assigned_to": "person name or role",
|
||||
"role": "person role or name",
|
||||
"assigned_to": "name",
|
||||
"role": "person role",
|
||||
"question": "e.g., Is the internal project team being followed according to the SOP?"
|
||||
"area_tag":"timeline"
|
||||
}
|
||||
]
|
||||
] ## up to at least 20 questions
|
||||
},
|
||||
{
|
||||
|
||||
"frequency_number": "3",
|
||||
"questions": [
|
||||
{
|
||||
"assigned_to": "person name or role",
|
||||
"role": "person role or name",
|
||||
"question": "e.g., Have communication protocols been followed for the task at hand?"
|
||||
"assigned_to": "name",
|
||||
"role": "person role",
|
||||
"question": "e.g., Have communication protocols been followed for the task at hand?".
|
||||
"area_tag":"communication"
|
||||
} ## up to at least 20 questions
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
"""
|
||||
return prompt
|
||||
|
||||
|
||||
def get_questions_prompt_v2():
|
||||
prompt = """
|
||||
You are tasked with generating assessment questions for workers based on their SOPs. These questions should vary by assessment type (daily, weekly, biweekly), frequency number (e.g., day 2, week 3), and total duration (e.g., 6 weeks).
|
||||
|
||||
Guidelines:
|
||||
1. Generate yes/no questions relevant to each worker's SOP based on their role.
|
||||
2. Use frequency numbers as 1, 2, 3, etc., regardless of the type.
|
||||
3. Tag each question with its topic area (e.g., communication, timeline).
|
||||
4. The questions should evolve in detail as assessments progress over time.
|
||||
|
||||
Example response:
|
||||
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"frequency_number": "2",
|
||||
"questions": [
|
||||
{
|
||||
"assigned_to": "John",
|
||||
"role": "Data Analyst",
|
||||
"question": "Is the dataset being cleaned according to the SOP?",
|
||||
"area_tag": "data quality"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"frequency_number": "3",
|
||||
"questions": [
|
||||
{
|
||||
"assigned_to": "Jane",
|
||||
"role": "Data Scientist",
|
||||
"question": "Are predictive models tested for accuracy before deployment?",
|
||||
"area_tag": "model validation"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+56
-4
@@ -13,6 +13,20 @@ def get_sop_extraction_from_doc():
|
||||
Provide the extracted sections exactly as they appear in the document.'''
|
||||
|
||||
|
||||
def get_roles_extraction_from_questionnaire():
|
||||
return '''Your task is to extract the "Roles" from the provided questionnaire responses.
|
||||
You must identify and categorize the roles based on the information provided.
|
||||
|
||||
Instructions:
|
||||
1. **Roles**: Extract the roles mentioned in the questionnaire.
|
||||
2. **Vision**: If applicable, extract the vision of the company or organization as it relates to the roles.
|
||||
3. **Mission**: If applicable, extract the mission of the company or organization as it relates to the roles.
|
||||
4. **Role-specific SOPs**:
|
||||
- Identify any role-specific Standard Operating Procedures (SOPs) mentioned in the questionnaire.
|
||||
- If SOPs for the role are not explicitly stated, infer them from the context, but only if there is clear evidence within the questionnaire. Do not generate or assume SOPs that are not directly supported by the information provided.
|
||||
- If no roles or SOPs are found, return an empty list for each category.
|
||||
Provide the extracted roles and any relevant sections exactly as they appear in the questionnaire.'''
|
||||
|
||||
|
||||
def get_sop_personalassessment_from_questionnaire():
|
||||
return '''Your task is to generate Standard Operating Procedures (SOPs) based on the responses to the questionnaire provided.
|
||||
@@ -44,22 +58,29 @@ def get_sop_personalassessment_from_area_role(role,areas,sop_types):
|
||||
Empty Lists: If no SOPs are generated, return an empty list for each category.
|
||||
Format: The SOPs should be direct and concise.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
def get_sop_executive_from_vision_goals(executive):
|
||||
return f"""Your task is to generate Standard Operating Procedures (SOPs) for executives namely:{executive} based on the provided vision and goals/mission.
|
||||
return f"""Your task is to generate Standard Operating Procedures (SOPs) for the executive namely: {executive}, based on the provided vision and goals/mission.
|
||||
|
||||
You must extract and categorize the SOPs into three categories: "must," "shall," and "will."
|
||||
Instructions:
|
||||
1. **Vision**: Use the provided vision to align SOPs with the overall direction of the organization.
|
||||
2. **Goals**: Utilize the specified goals to create SOPs that support their achievement.
|
||||
3. **Executive-level SOPs**:
|
||||
- Categorize the SOPs under three categories: "must," "shall," and "will."
|
||||
- Categorize the SOPs under three categories: "must," "shall," and "will."
|
||||
- The SOPs should be directly aligned with executive responsibilities and decision-making.
|
||||
- Ensure the SOPs reflect high-level strategic thinking and leadership expectations.
|
||||
- If SOPs are not explicitly mentioned, infer them from the context of the vision and goals, but only if there is clear evidence. Do not generate or assume SOPs that are not directly supported by the information provided.
|
||||
- If no SOPs can be generated, return an empty list for each category.
|
||||
|
||||
4. If the executive is specified as "Admin," meaning there is a single executive managing all workers and projects, use the vision and mission to generate SOPs.
|
||||
5. Ensure that the generated SOPs can mention the company name if known from the document for better clarity.
|
||||
6. For any exceutive provided , make sure sops is generated if mission and vision is provided
|
||||
|
||||
Provide the generated SOPs based on the vision and goals, focusing on executive-level responsibilities and actions"""
|
||||
|
||||
Provide the generated SOPs based on the vision and goals, focusing on executive-level responsibilities and actions."""
|
||||
|
||||
def get_vision_mission_extraction_from_doc():
|
||||
return """Extract vision and mission statements from the document:
|
||||
@@ -88,6 +109,7 @@ def get_vision_mission_extraction_from_doc():
|
||||
- If SOPs for managers are not explicitly stated, infer them from the context provided by the executives, but only if there is clear evidence within the document.
|
||||
- Do not generate or assume SOPs that are not directly supported by the document or the executive directives.
|
||||
- If no SOPs are found for managers, return an empty list for each category.
|
||||
- add header as the starting statment of the sop depending on who the sop is pointing too e.g "Under the inmsights amd control of the develpopment the admin:"
|
||||
Provide the extracted sections exactly as they appear in the document.
|
||||
'''
|
||||
|
||||
@@ -293,3 +315,33 @@ 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
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Example forma
|
||||
{
|
||||
"departments": [
|
||||
{
|
||||
"name": "Department A",
|
||||
"managers": [
|
||||
{
|
||||
"name": "Worker A",
|
||||
"must": ["Conduct weekly meetings"],
|
||||
"shall": ["Submit monthly reports"],
|
||||
"will": ["Improve efficiency"]
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user