added manager and execuytive generator

This commit is contained in:
OwusuBlessing
2024-09-09 14:03:14 +01:00
parent 13ddfa3e10
commit 0d8ad2381b
7 changed files with 506 additions and 211 deletions
+56 -9
View File
@@ -93,31 +93,45 @@ def get_vision_mission_extraction_from_doc():
def get_departments_and_roles_extraction_prompt():
def get_departments_managers_workers_extraction_prompt():
return """
Extract departments and their senior managerial roles from the document.
Include only managerial positions (e.g., Department Head, Director, Manager).
For each role, list 2-3 key responsibilities.
Do not add any departments or roles that are not explicitly mentioned in the document.
Extract departments, their managers, and workers from the document.
For each department, include the managers (e.g., Department Head, Director, Manager) and their key responsibilities.
Additionally, for each department, extract the workers and their positions, and list 1-2 key responsibilities for each worker.
Do not add any departments, managers, or workers that are not explicitly mentioned in the document.
Managers: Include the managers (e.g., Department Head, Manager), their role , and key responsibilities.
- **PRP (Primary Responsible Person)**: A manager who has primary responsibility for decision-making and overseeing operations.
- **SRP (Secondary Responsible Person)**: A manager who supports the PRP, often assisting with tasks and providing backup in decision-making.
Format as JSON:
{
"departments": [
{
"name": "Department Name",
"managerial_roles": [
"managers": [
{
"title": "Managerial Role Title",
"name": "Manager Name",
"position": "manager Position",
"role": "PRP or SRP", # The classification field either PRP or SRP
"responsibilities": ["Key Responsibility 1", "Key Responsibility 2"]
}
],
"workers": [
{
"name": "Worker Name",
"position": "Worker Position",
"responsibilities": ["Key Responsibility 1", "Key Responsibility 2"]
}
]
}
]
}
If no departments or roles are found in the document, return an empty list for departments.
If no departments, managers, or workers are found in the document, return an empty list for departments.
"""
def get_sop_for_department_managers():
return '''Generate Standard Operating Procedures (SOPs) for the specified managerial role in the given department.
@@ -186,4 +200,37 @@ def get_sop_executive_from_questionnaire():
]
}
Ensure that each specified department has its own set of SOPs.
'''
'''
def generate_llm_comparison_prompt(reference_roles, extracted_managers):
reference_roles_str = ', '.join(reference_roles)
extracted_managers_str = '\n'.join([f"- {manager['name']} (Position: {manager['position']}, Role: {manager['role']})" for manager in extracted_managers])
prompt = f"""
You are tasked with comparing a list of reference roles with the extracted roles from a document.
Reference roles:
[{reference_roles_str}]
Extracted roles:
{extracted_managers_str}
Please classify the roles into the following categories:
1. **Assigned Roles**: Roles that are found in both the reference list and the extracted list.
2. **Unassigned Roles**: Roles that are found in the reference list but not in the extracted list.
3. **Unavailable Roles**: Roles that are found in the extracted list but not in the reference list.
Return the result in the following JSON format:
{
"assigned_roles": [
{"name": "Role Name", "position": "Role Position", "role": "PRP or SRP"}
],
"unassigned_roles": [
{"name": "Role Name", "position": "Reference Role"}
],
"unavailable_roles": [
{"name": "Role Name", "position": "Role Position", "role": "PRP or SRP"}
]
}
"""
return prompt