658 lines
40 KiB
Python
658 lines
40 KiB
Python
def get_sop_extraction_from_doc():
|
||
return '''Your task is to generate Standard Operating Procedures (SOPs) for the verified workers based on the provided document and their positions.
|
||
You must extract and categorize the SOPs into three categories: "must", "shall", and "will."
|
||
|
||
Instructions:
|
||
1. **Vision**: Extract the vision of the company or organization.
|
||
2. **Mission**: Extract the mission of the company or organization. If not explicitly mentioned, consider the mission as the company's goals.
|
||
3. **Position-specific SOPs**:
|
||
- Categorize the SOPs under three categories: "must," "shall," and "will."
|
||
- The SOPs should be directly relevant to the verified workers' positions and responsibilities, ensuring that the position names remain exactly the same as provided.
|
||
- If multiple workers share the same position, generate a single set of SOPs for that position., Do not repeat it for the same position
|
||
- If SOPs for the position are not explicitly stated, infer them from the context, but only if there is clear evidence within the document. Do not generate or assume SOPs that are not directly supported by the document.
|
||
- If no SOPs are found for the position, return an empty list for each category.
|
||
Use the provided workers' information to ensure the SOPs are tailored to the verified workers.'''
|
||
|
||
|
||
def get_roles_extraction_from_questionnaire():
|
||
return '''
|
||
|
||
You are a specialized role extractor for company documents. Your task is to identify and extract job roles/positions mentioned in the provided Questionairre data.
|
||
|
||
TASK:
|
||
1. Extract ALL job roles/positions mentioned in the in questionairre response data as a list.
|
||
2. Filter the extracted roles based on the provided role_slug that will be provided.
|
||
3. Return the filtered roles as a JSON list.
|
||
|
||
RULES:
|
||
- Return an empty list if no matching roles are found.
|
||
- The role_slug is a keyword or category used to filter relevant roles.
|
||
- Only include roles that semantically relate to the role_slug.
|
||
- Be precise in extracting official job titles rather than general descriptions.
|
||
|
||
EXAMPLES:
|
||
|
||
Example 1:
|
||
Text: "Our company is looking to hire a Senior Data Scientist, Junior Data Analyst, and Database Administrator for the Analytics department. We also have openings for Financial Manager and Customer Support Manager."
|
||
Role_slug: "data"
|
||
Expected output: ["Senior Data Scientist", "Junior Data Analyst", "Database Administrator"]
|
||
|
||
Example 2:
|
||
Text: "The restructuring process will affect several departments including the Financial Analysis team, Customer Relations department, and Sales Management. We are currently seeking a Regional Sales Manager, Sales Team Supervisor, and Customer Support Manager."
|
||
Role_slug: "manager"
|
||
Expected output: ["Financial Manager", "Regional Sales Manager", "Customer Support Manager"]
|
||
|
||
|
||
'''
|
||
|
||
|
||
def get_sop_personalassessment_from_questionnaire():
|
||
return '''Your task is to generate Standard Operating Procedures (SOPs) based on the responses to the questionnaire provided.
|
||
|
||
You must extract and categorize the SOPs into three categories: "must," "shall," and "will."
|
||
|
||
Instructions:
|
||
1. **Vision or Strategic Direction**: Use the provided project vision or strategic direction to align SOPs with the overall goals of the project.
|
||
2. **Roles**: Generate SOPs for the specific roles required for the project.
|
||
3. **Responsibilities**: For each role, use the outlined key responsibilities to generate SOPs.
|
||
4. **Project Details**: Incorporate any additional project information to ensure the SOPs reflect the full scope of the project.
|
||
|
||
Role-specific SOPs:
|
||
- Categorize the SOPs under three categories: "must," "shall," and "will."
|
||
- The SOPs should be directly aligned with the role and responsibilities provided in the questionnaire.
|
||
- If SOPs for the role are not explicitly mentioned, infer them from the context of the responsibilities, vision, and project details, 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 are found for the role, return an empty list for each category.
|
||
|
||
Provide the generated SOPs based on the questionnaire responses.'''
|
||
|
||
def get_sop_personalassessment_from_area_role(role,sop_types,qna=None,areas=None):
|
||
if not areas:
|
||
areas = "Not provided"
|
||
return f"""Your job is to generate Standard Operating Procedures (SOPs) for the role of "{role}" with a focus on the prvided area
|
||
"{areas}" based on the following instructions:
|
||
|
||
Instructions:
|
||
Categorization: Organize the SOPs under the selected categories: a checkboxex of the three categories "must" , "shall" and "will"
|
||
So use the selected sop types categories: {sop_types} #adhere strictly to these sop types alone and make sure they are not missing
|
||
Direct Instructions: The SOPs should directly address responsibilities, objectives, and challenges related to the area of "{areas}" for the role of "{role}".
|
||
Questions and Anwer context: If extra questions and answers answered based on role is the provided, use that as more context(related to this role)
|
||
Contextual Inference: If SOPs for the area are not explicitly stated, infer them from the role and area context provided.
|
||
Format: The SOPs should be direct and concise.
|
||
|
||
provided questions and answer: {qna}
|
||
INSTRUCTIONS : STRICTLY ADHERE TO THESE INSTRUCTIONS
|
||
NOTE: IF AREAS ARE NOT PROVIDED (AREA IS "NOT PROVIDED"), INTUITIVELY PROVIDE THE SOP BASED ON THE ROLE NAME.
|
||
NOTE: MAKE SURE SOPS ARE NOT MISSING FOR THE PROVIDED TYPES.
|
||
NOTE: FOR SOP TYPES NOT SELECTED RETURN AN EMPTY LIST and not "null" E.G IF "SHALL" AND "WILL" ARE SELECTED BUT "MUST" IS NOT AMONG, MUST WILL BE AN EMPTY LIST
|
||
|
||
|
||
|
||
"""
|
||
|
||
|
||
def get_sop_personalassessment_from_area_rolev2():
|
||
|
||
return f"""Your job is to generate Standard Operating Procedures (SOPs) for the information provided on different roles role of with a focus on the prvided areas
|
||
based on the following instructions:
|
||
Instructions:
|
||
Categorization: Organize the SOPs under the selected categories: a checkboxex of the three categories "must" , "shall" and "will"
|
||
So use the selected sop types categories for the specified role : #adhere strictly to these sop types alone and make sure they are not missing
|
||
Direct Instructions: The SOPs should directly address responsibilities, objectives, and challenges related to the area of specified to the specific role".
|
||
Questions and Anwer context: If extra questions and answers answered based on roles is the provided, use that as more context to generate the sop
|
||
Contextual Inference: If SOPs for the area are not explicitly stated, infer them from the role and area context provided.
|
||
Format: The SOPs should be direct and concise.(5-7) bullet point per sop type is okay for each role but 3-4 on average is very good
|
||
INSTRUCTIONS : STRICTLY ADHERE TO THESE INSTRUCTIONS
|
||
NOTE: IF AREAS ARE NOT PROVIDED (AREA IS "NOT PROVIDED"), INTUITIVELY PROVIDE THE SOP BASED ON THE ROLE NAME.
|
||
NOTE: MAKE SURE SOPS ARE NOT MISSING FOR THE PROVIDED TYPES.
|
||
NOTE: FOR SOP TYPES NOT SELECTED RETURN AN EMPTY LIST and not "null" E.G IF "SHALL" AND "WILL" ARE SELECTED BUT "MUST" IS NOT AMONG, MUST WILL BE AN EMPTY LIST
|
||
also for each role , add a "narrative" which is short description of the role in question
|
||
|
||
NOTE !!!: IF A ROLE POINTS TO A SPECIFIC SOP TYPE (E.G., "SHALL" AND "MUST"), THESE TWO MUST NEVER BE EMPTY FOR THAT ROLE.
|
||
: FORMAT: SOPS SHOULD BE CLEAR, DIRECT, AND CONCISE. EACH ROLE SHOULD HAVE 5-7 BULLET POINTS PER SOP TYPE ("WILL," "SHALL," OR "MUST"). FOR COMPLEX ROLES, EACH SOP TYPE MAY HAVE A MAXIMUM OF 7-10 BULLET POINTS, NOT TOTAL ACROSS ALL TYPES, BUT PER SOP TYPE.
|
||
|
||
|
||
"""
|
||
|
||
def get_sop_executive_from_vision_goals(executive):
|
||
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."
|
||
- 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"""
|
||
|
||
|
||
def get_vision_mission_extraction_from_doc():
|
||
return """Extract vision and mission statements from the document:
|
||
|
||
You are provided with an organization document , your goal is to extract vision and mission(or goals) from the document
|
||
|
||
1. Analyze for explicit or implicit statements.
|
||
2. Vision: Long-term aspirations or ideal future state.
|
||
3. Mission: Organization's purpose, core functions, or primary objectives.
|
||
4. Include multiple statements if found.
|
||
5. Infer from context if not explicit.
|
||
6. Format as two lists: vision and mission.
|
||
7. Return empty list if none found for either category.
|
||
8. If vision and mission is found in the document , extract them as it is ,no changes
|
||
NOTE: MAKE SURE YOU EXTRACT EVERY INFORMATION FOUND FOR VISION AND GOALS FROM THE DOCUMENT.DO NOT OMIT ANY
|
||
PROVIDE EXTRACTED OR INFERRED VISION AND MISSION STATEMENTS."""
|
||
|
||
|
||
def get_vision_mission_extraction_from_doc2():
|
||
return """
|
||
|
||
You are provided with a organization document and the departments in the organization and your role is to extract the vision and mission(alo called goals) from the document
|
||
If the vision and mission are clearly stated in the document
|
||
- Extract the vision of the organization as they are
|
||
- Extract the goals(mission) of each the company based on the provided goals of the department and overall questionairre response
|
||
|
||
if the vision and mission are not clearly stated in the document
|
||
- Infer the vision and mission from the context of the document
|
||
- Analyze for explicit or implicit statements.
|
||
2. Vision: Long-term aspirations or ideal future state.
|
||
3. Mission: Organization's purpose, core functions, or primary objectives.
|
||
4. Include multiple statements if found.
|
||
5. Infer from context if not explicit.
|
||
7. Return empty list if none found for either category.
|
||
8. If vision and mission is found in the document , extract them as it is ,no changes
|
||
NOTED: if the goal(mission) and vision cant not be found at all, make it empty please
|
||
NOTE: MAKE SURE YOU EXTRACT EVERY INFORMATION FOUND FOR VISION AND GOALS FROM THE DOCUMENT.DO NOT OMIT ANY
|
||
**You must return the response in the exact HTML `<p>` format shown below, including the numbering, lettered sub-points, `<br>` tags for line breaks, and the double `<br><br>` between departments. Adhere to this format precisely.**
|
||
|
||
**Instructions:**
|
||
- If **no departments are explicitly mentioned**, assume all content applies to all departments mentioned in the document.
|
||
- Group goals by department when possible.
|
||
- Each goal should have a **title** and **a short description**.
|
||
- Format your output with:
|
||
- An **HTML section** for rendering on the frontend.
|
||
- A **structured JSON section** with department-wise goal breakdown.
|
||
|
||
**Example Output Format:**
|
||
|
||
{
|
||
"html": [
|
||
"<p>Vision: To create safe, broadly beneficial AI systems that ensure the advantages of artificial general intelligence (AGI) are shared equitably across society. Our vision emphasizes the importance of safety and alignment, ensuring that AI systems align with human values and remain under human control. We aspire to collaborate with other research and policy institutions to address global challenges associated with advanced AI, prioritizing the safe development of increasingly capable systems that act in the best interests of humanity.</p>",
|
||
"<p>Company Goals:</p><p>1. Audit Department:<br> a. Enhance Risk Management and Internal Controls: Strengthen the organization’s risk posture by identifying, assessing, and recommending improvements to internal controls.<br> b. Ensure Regulatory and Policy Compliance: Monitor adherence to relevant laws, regulations, standards, and internal policies.<br> c. Support Organizational Governance: Provide independent assurance to senior management and the board on the effectiveness of governance processes.<br> d. Drive Operational Efficiency: Identify inefficiencies and areas for process improvement during audits.<br> e. Leverage Technology and Data Analytics: Use automated tools and analytics for continuous auditing and real-time risk monitoring.<br> f. Develop Audit Talent and Capabilities: Invest in training and upskilling for the audit team.<br> g. Enhance Stakeholder Communication: Improve reporting clarity, timeliness, and relevance to stakeholders.<br><br>2. Finance Department:<br> a. Ensure Financial Stability and Sustainability: Maintain strong cash flow and optimize working capital.<br> b. Improve Financial Planning and Analysis (FP&A): Provide accurate forecasting and budgeting to support strategic decision-making.<br> c. Enhance Cost Management and Operational Efficiency: Identify cost-saving opportunities and drive efficient use of financial resources.<br> d. Ensure Regulatory and Compliance Integrity: Maintain full compliance with financial regulations and internal controls.<br> e. Enable Strategic Investment and Capital Allocation: Evaluate and fund initiatives that align with the organization’s long-term growth strategy.<br> f. Improve Financial Reporting and Transparency: Deliver timely and accurate financial reports for stakeholders.<br> g. Leverage Financial Technology and Automation: Implement tools to streamline financial operations.<br> h. Develop Finance Talent and Leadership: Upskill finance staff and promote cross-functional knowledge.<br><br>3. Account Department:<br> a. Maintain Accurate and Timely Financial Records: Ensure all transactions are recorded properly.<br> b. Ensure Regulatory and Tax Compliance: Comply with all financial regulations and timely tax filings.<br> c. Streamline Month-End and Year-End Closing Processes: Reduce the time and complexity of closing periods.<br> d. Support Strategic Financial Planning: Provide reliable data for budgeting and forecasting.<br> e. Implement Automation and Digital Tools: Use accounting software and RPA to increase efficiency.<br> f. Strengthen Internal Controls and Risk Management: Ensure robust controls over financial transactions.<br> g. Improve Financial Transparency and Reporting Quality: Produce clear and consistent reports for stakeholders.<br> h. Develop Accounting Team Skills and Expertise: Provide continuous learning and leadership development for accounting staff.<br></p>"
|
||
],
|
||
|
||
"department_goals": [
|
||
{
|
||
"department": "Account Management",
|
||
"goals": [
|
||
{
|
||
"goal_title": "Customer Satisfaction",
|
||
"goal_description": "Manage accounts effectively to enhance customer satisfaction and retention."
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"department": "Finance",
|
||
"goals": [
|
||
{
|
||
"goal_title": "Financial Stability",
|
||
"goal_description": "Finance the company to ensure long-term sustainability and growth."
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
|
||
NOTE, VERY CRITICAL: FOLLOW THIS RESPONSE FORMAT STRICTLY , NOTHING BEFORE OR AFTER PLEASE !!!
|
||
|
||
"""
|
||
|
||
|
||
|
||
''' def get_sop_executive_for_managers():
|
||
return Your task is to extract the "Vision", "Mission", and executive-generated Standard Operating Procedures (SOPs) specifically for managers from the provided document.
|
||
|
||
Instructions:
|
||
1. **Vision**: Extract the vision of the company or organization as outlined by the executives.
|
||
2. **Mission**: Extract the mission of the company or organization. If not explicitly mentioned, consider the mission as the company's strategic goals.
|
||
3. **Executive-generated SOPs for Managers**:
|
||
- Categorize the SOPs under three categories: "must," "shall," and "will."
|
||
- The SOPs should be specific to the managerial role (e.g., handling team performance, reporting, budgeting, etc.).
|
||
- 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.
|
||
'''
|
||
|
||
def get_vision_mission_extraction_from_questionnaire_executive():
|
||
return """
|
||
|
||
You are provided with an organization's response from a questionnaire, and your role is to extract the vision and mission (also called goals) from the for each of the departments found questionnaire response:
|
||
|
||
- Generate the vision(at least one paragraph)of the organization based on the questionnaire and
|
||
- Generate the goals (mission) of the company based on the provided departmental goals and overall questionairre response
|
||
|
||
If the vision and mission are not clearly stated in the questionnaire:
|
||
- Infer the vision and mission from the context of the questionnaire.
|
||
- Analyze for explicit or implicit statements.
|
||
1. Vision: Long-term aspirations or ideal future state.
|
||
2. Mission: Organization's purpose, core functions, or primary objectives.
|
||
3. Include multiple statements if found.
|
||
4. Infer from context if not explicitly stated.
|
||
5. Return an empty list if none are found for either category.
|
||
|
||
NOTE: If the goal and mission of a can not be gotten from the questionaire response, make it empty.
|
||
NOTE: Ensure you extract every piece of information found for the vision and goals from the questionnaire. DO NOT OMIT ANYTHING.
|
||
|
||
NOTE: Group the goals based on the departments found in the questions see example response below pointing to sales, marketing and product develpoment
|
||
NOTE: ADHERE STRICTLY TO THIS OUTPUT FORMAT , DO NOT CHANGE IT PLEASE
|
||
**Example Output Format:** Two texts (one for vision and for goal)
|
||
|
||
- Format your output with:
|
||
- An **HTML section** for rendering on the frontend.
|
||
- A **structured JSON section** with department-wise goal breakdown.
|
||
|
||
**Example Output Format:**
|
||
|
||
{
|
||
"html": [
|
||
"<p>Vision: To create safe, broadly beneficial AI systems that ensure the advantages of artificial general intelligence (AGI) are shared equitably across society. Our vision emphasizes the importance of safety and alignment, ensuring that AI systems align with human values and remain under human control. We aspire to collaborate with other research and policy institutions to address global challenges associated with advanced AI, prioritizing the safe development of increasingly capable systems that act in the best interests of humanity.</p>",
|
||
"<p>Company Goals:</p><p>1. Audit Department:<br> a. Enhance Risk Management and Internal Controls: Strengthen the organization’s risk posture by identifying, assessing, and recommending improvements to internal controls.<br> b. Ensure Regulatory and Policy Compliance: Monitor adherence to relevant laws, regulations, standards, and internal policies.<br> c. Support Organizational Governance: Provide independent assurance to senior management and the board on the effectiveness of governance processes.<br> d. Drive Operational Efficiency: Identify inefficiencies and areas for process improvement during audits.<br> e. Leverage Technology and Data Analytics: Use automated tools and analytics for continuous auditing and real-time risk monitoring.<br> f. Develop Audit Talent and Capabilities: Invest in training and upskilling for the audit team.<br> g. Enhance Stakeholder Communication: Improve reporting clarity, timeliness, and relevance to stakeholders.<br><br>2. Finance Department:<br> a. Ensure Financial Stability and Sustainability: Maintain strong cash flow and optimize working capital.<br> b. Improve Financial Planning and Analysis (FP&A): Provide accurate forecasting and budgeting to support strategic decision-making.<br> c. Enhance Cost Management and Operational Efficiency: Identify cost-saving opportunities and drive efficient use of financial resources.<br> d. Ensure Regulatory and Compliance Integrity: Maintain full compliance with financial regulations and internal controls.<br> e. Enable Strategic Investment and Capital Allocation: Evaluate and fund initiatives that align with the organization’s long-term growth strategy.<br> f. Improve Financial Reporting and Transparency: Deliver timely and accurate financial reports for stakeholders.<br> g. Leverage Financial Technology and Automation: Implement tools to streamline financial operations.<br> h. Develop Finance Talent and Leadership: Upskill finance staff and promote cross-functional knowledge.<br><br>3. Account Department:<br> a. Maintain Accurate and Timely Financial Records: Ensure all transactions are recorded properly.<br> b. Ensure Regulatory and Tax Compliance: Comply with all financial regulations and timely tax filings.<br> c. Streamline Month-End and Year-End Closing Processes: Reduce the time and complexity of closing periods.<br> d. Support Strategic Financial Planning: Provide reliable data for budgeting and forecasting.<br> e. Implement Automation and Digital Tools: Use accounting software and RPA to increase efficiency.<br> f. Strengthen Internal Controls and Risk Management: Ensure robust controls over financial transactions.<br> g. Improve Financial Transparency and Reporting Quality: Produce clear and consistent reports for stakeholders.<br> h. Develop Accounting Team Skills and Expertise: Provide continuous learning and leadership development for accounting staff.<br></p>"
|
||
],
|
||
|
||
"department_goals": [
|
||
{
|
||
"department": "Account Management",
|
||
"goals": [
|
||
{
|
||
"goal_title": "Customer Satisfaction",
|
||
"goal_description": "Manage accounts effectively to enhance customer satisfaction and retention."
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"department": "Finance",
|
||
"goals": [
|
||
{
|
||
"goal_title": "Financial Stability",
|
||
"goal_description": "Finance the company to ensure long-term sustainability and growth."
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
|
||
NOTE: FOLLOW THIS RESPONSE FORMAT STRICTLY , NOTHING BEFORE OR AFTER PLEASE !!!
|
||
|
||
"""
|
||
|
||
|
||
def get_departments_managers_workers_extraction_prompt():
|
||
return """
|
||
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",
|
||
"managers": [
|
||
{
|
||
"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, managers, or workers are found in the document, return an empty list for departments.
|
||
"""
|
||
|
||
def get_managers_workers_extraction_prompt():
|
||
return """
|
||
Extract only the managers and workers from the document.
|
||
For each manager, include their name, position, role, and key responsibilities.
|
||
Additionally, for each worker, extract their name, position, and list 1-2 key responsibilities.
|
||
Do not add any 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:
|
||
{
|
||
"managers": [
|
||
{
|
||
"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 managers or workers are found in the document, return an empty list for them.
|
||
"""
|
||
|
||
|
||
|
||
|
||
|
||
|
||
def get_sop_for_department_managers():
|
||
return '''Generate Standard Operating Procedures (SOPs) for the specified managerial role in the given department.
|
||
|
||
Instructions:
|
||
1. Focus on the specific managerial role and department provided.
|
||
2. Generate relevant SOPs categorized as "must," "shall," and "will."
|
||
3. Ensure SOPs are actionable, clear, and directly related to the manager's responsibilities.
|
||
4. Consider the department's specific needs when creating the SOPs.
|
||
5. Return an empty list for each category if no relevant SOPs can be generated.
|
||
|
||
Format the response as a JSON object with "must", "shall", and "will" categories, each containing a list of SOPs.
|
||
|
||
Example format:
|
||
{
|
||
"must": [
|
||
"Conduct weekly team meetings to review project progress",
|
||
],
|
||
"shall": [
|
||
"Provide monthly performance reports to upper management",
|
||
],
|
||
"will": [
|
||
"Explore ways to improve department efficiency",
|
||
]
|
||
}
|
||
'''
|
||
|
||
|
||
def get_sop_executive_from_questionnaire():
|
||
return '''Generate Standard Operating Procedures (SOPs) for specific executives and department managers based on the provided questionnaire responses.
|
||
|
||
|
||
|
||
Format the response as a JSON object with the following structure:
|
||
{
|
||
"executives": {
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
},
|
||
"departments": [
|
||
{
|
||
"name": "Department Name",
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
},
|
||
{
|
||
"name": "Department Name",
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
}
|
||
]
|
||
}
|
||
|
||
Ensure that each specified department has its own set of SOPs and if managers are empty arrays- make sop empty for that department
|
||
'''
|
||
|
||
|
||
def get_sop_executive_from_questionnaire():
|
||
return '''Generate Standard Operating Procedures (SOPs) for specific executives and department managers based on the provided questionnaire responses.
|
||
|
||
Instructions:
|
||
1. Use the organizational vision and strategic goals and department strategic goals to create overarching SOPs for the executives.
|
||
2. Use the departmental strategic goals and team questionnaire to create specific SOPs for each department.
|
||
3. Categorize all SOPs into "must," "shall," and "will" categories.
|
||
4. Ensure SOPs are actionable, clear, and directly related to the provided information.
|
||
5. For executives, focus on high-level, strategic SOPs that align with the overall vision and goals.
|
||
6. For departments, create SOPs based on their department strategic goals and team questionaiire response
|
||
|
||
Format the response as a JSON object with the following structure:
|
||
{
|
||
"executives": [{
|
||
"role":"exceutive role name":
|
||
"sops": {
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
},
|
||
{"role":"exceutitve role 2 name"
|
||
"sops": {
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]}
|
||
],
|
||
...
|
||
},
|
||
"departments": [
|
||
{
|
||
"name": "Department Name",
|
||
"managers": [
|
||
"role":"manager role name",
|
||
"sops":{
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
},
|
||
{
|
||
"name": "Department Name 2",
|
||
"managers": [
|
||
"role":"manager role name",
|
||
"sops":{
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
}]
|
||
},
|
||
...
|
||
]
|
||
}
|
||
Ensure that each specified department has its own set of SOPs.if managers are not provided or empty array for a department, make sop for that department empty--> do not form managers and create sop
|
||
'''
|
||
|
||
|
||
|
||
|
||
|
||
def get_sop_executive_from_questionnaire2():
|
||
return '''Generate Standard Operating Procedures (SOPs) for specific department managers based on the provided questionnaire responses.
|
||
|
||
Instructions:
|
||
2. Use the departmental strategic goals and team questionnaire and role bases answers if provided to create specific SOPs for each department.
|
||
3. Categorize all SOPs into "must," "shall," and "will" categories.
|
||
4. Ensure SOPs are actionable, clear, and directly related to the provided information.
|
||
5. For executives, focus on high-level, strategic SOPs that align with the overall vision and goals.
|
||
6. For departments, create SOPs based on their department strategic goals and team questionaiire response
|
||
|
||
Format the response as a JSON object with the following structure:
|
||
{"departments": [
|
||
{
|
||
"name": "Department Name",
|
||
"managers": [
|
||
"role":"manager role name",
|
||
"sops":{
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
},
|
||
{
|
||
"name": "Department Name 2",
|
||
"managers": [
|
||
"role":"manager role name",
|
||
"sops":{
|
||
"must": ["SOP 1", "SOP 2", ...],
|
||
"shall": ["SOP 1", "SOP 2", ...],
|
||
"will": ["SOP 1", "SOP 2", ...]
|
||
}]
|
||
},
|
||
...
|
||
]
|
||
}
|
||
Ensure that each specified department has its own set of SOPs.if managers are not provided or empty array for a department, make sop for that department empty--> do not form managers and create sop
|
||
'''
|
||
def get_roles_reference_comparison():
|
||
prompt = """
|
||
You are tasked with comparing a list of reference roles with the extracted roles from a document.
|
||
|
||
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.
|
||
|
||
Instruction:
|
||
1. Use only the position to judge the extraction.
|
||
|
||
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
|
||
|
||
|
||
|
||
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 worker 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",
|
||
"workers": [
|
||
{
|
||
"name": "Worker A",
|
||
"must": ["Conduct weekly meetings"],
|
||
"shall": ["Submit monthly reports"],
|
||
"will": ["Improve efficiency"]
|
||
}
|
||
|
||
]
|
||
}
|
||
]
|
||
}
|
||
'''
|
||
|
||
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 manager's duties.
|
||
4. If no SOPs can be generated, return empty lists for each category.
|
||
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
|
||
{
|
||
"departments": [
|
||
{
|
||
"name": "Department A",
|
||
"managers": [
|
||
{
|
||
"name": "manager A",
|
||
"must": ["Conduct weekly meetings"],
|
||
"shall": ["Submit monthly reports"],
|
||
"will": ["Improve efficiency"]
|
||
}
|
||
|
||
]
|
||
}
|
||
]
|
||
}
|
||
'''
|
||
|
||
|
||
|
||
def get_dept_vision_mission_extraction_from_doc2():
|
||
return """
|
||
|
||
You are provided with an organizational document and a list of departments within the organization. Your role is to extract the vision of the organization and the goals/mission of each department from the document. Follow these guidelines:
|
||
|
||
If the vision and mission are clearly stated in the document:
|
||
|
||
Extract the vision of the organization exactly as stated, without modification.
|
||
Extract the goals/mission of each department exactly as provided in the document, ensuring no information is omitted.
|
||
If the vision and mission are not clearly stated:
|
||
|
||
Infer the vision and mission from the context of the document by analyzing explicit or implicit statements.
|
||
Vision: Identify the long-term aspirations or ideal future state of the organization.
|
||
Mission: Identify the organization's purpose, core functions, or primary objectives, including departmental goals where applicable.
|
||
Additional Instructions:
|
||
|
||
If multiple statements for vision or mission are found, include all relevant statements.
|
||
If vision and mission are entirely absent, return an empty list for the missing category.
|
||
Ensure all extracted or inferred information is complete and accurately reflects the document's content.
|
||
Do not omit any relevant details for vision and mission found in the document.
|
||
Note: If the vision or mission is found in the document, extract it exactly as it appears without making any changes.
|
||
"""
|
||
|
||
def get_dept_vision_mission_extraction_from_questionaiire():
|
||
return """
|
||
|
||
You are provided with an questionaiire response within the organization. Your role is to extract the vision of the organization and the goals/mission of each department from the document. Follow these guidelines:
|
||
|
||
If the vision and mission are clearly stated in the document:
|
||
|
||
Extract the vision of the organization exactly as stated, without modification.
|
||
Extract the goals/mission of each department exactly as provided in the document, ensuring no information is omitted.
|
||
If the vision and mission are not clearly stated:
|
||
|
||
Infer the vision and mission from the context of the document by analyzing explicit or implicit statements.
|
||
Vision: Identify the long-term aspirations or ideal future state of the organization.
|
||
Mission: Identify the organization's purpose, core functions, or primary objectives, including departmental goals where applicable.
|
||
Additional Instructions:
|
||
|
||
If multiple statements for vision or mission are found, include all relevant statements.
|
||
If vision and mission are entirely absent, return an empty list for the missing category.
|
||
Ensure all extracted or inferred information is complete and accurately reflects the respone's content.
|
||
Do not omit any relevant details for vision and mission found in the document.
|
||
|
||
""" |