added sop pdf generator

This commit is contained in:
2025-05-12 21:55:50 +00:00
parent dcae438e64
commit d005200145
8 changed files with 579 additions and 149 deletions
+30 -13
View File
@@ -15,19 +15,35 @@ def get_sop_extraction_from_doc():
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.'''
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():
@@ -89,6 +105,7 @@ def get_sop_personalassessment_from_area_rolev2():
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.