def get_sop_extraction_from_doc(): return '''Your task is to extract the "Vision", "Mission", and role-specific Standard Operating Procedures (SOPs) from the provided document. 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. **Role-specific SOPs**: - Categorize the questions under three categories: "must," "shall," and "will." - The questions should be directly addressed to the person in the role. Do not reference the role itself in the question. - If SOPs for the role 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 role, return an empty list for each category. Provide the extracted sections exactly as they appear in the document.''' 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,areas,sop_types): return f"""Your job is to generate Standard Operating Procedures (SOPs) for the role of "{role}" with a focus on the areas "{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} Direct Instructions: The SOPs should directly address responsibilities, objectives, and challenges related to the area of "{areas}" for the role of "{role}". Contextual Inference: If SOPs for the area are not explicitly stated, infer them from the role and area context provided. 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. 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. 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: 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. Provide extracted or inferred vision and mission statements.""" ''' 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. Provide the extracted sections exactly as they appear in the document. ''' 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. Instructions: 1. Use the organizational vision and strategic goals to create overarching SOPs for each executive. 2. Use the departmental strategic goals to create specific SOPs for each department's managers. 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 department managers, create department-specific SOPs based on their strategic goals. 7. Only generate SOPs for the specified departments. Format the response as a JSON object with the following structure: { "executives": { "Executive Name 1": { "must": ["SOP 1", "SOP 2", ...], "shall": ["SOP 1", "SOP 2", ...], "will": ["SOP 1", "SOP 2", ...] }, "Executive Name 2": { "must": ["SOP 1", "SOP 2", ...], "shall": ["SOP 1", "SOP 2", ...], "will": ["SOP 1", "SOP 2", ...] }, ... }, "departments": [ { "name": "Department Name", "managers": { "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. ''' 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"] } ] } ] } '''