updated questions generator

This commit is contained in:
2024-10-15 01:56:05 +00:00
parent cd10cdaf7d
commit 8ce331b023
10 changed files with 427 additions and 105 deletions
+44 -12
View File
@@ -148,27 +148,30 @@ def predict_next_n_assessments_prompt():
return prompt
def recommend_assessment_frequency_prompt():
return '''
You are provided with the Standard Operating Procedures (SOPs) for various roles within a company. Your task is to collectively recommend the best assessment type and frequency (either weekly, biweekly, or quarterly) for all employees based on the overall nature of the SOPs.
You are provided with the Standard Operating Procedures (SOPs) for various roles within a company, along with options (e.g., ['weekly', 'monthly', 'biweekly']) for how frequently assessments should be performed. Your task is to recommend the best assessment type and frequency (weekly, biweekly, or quarterly) for all employees, based on the overall nature of the SOPs.
Consider the following when making your recommendation:
- The overall complexity and criticality of the tasks outlined in the SOPs.
- The frequency of updates or changes needed to the roles or procedures.
When making your recommendation, consider the following:
- The complexity and criticality of the tasks outlined in the SOPs.
- The frequency of updates or changes to the roles or procedures.
- The urgency of the responsibilities and their potential impact on the company's performance.
- The balance between the need for regular evaluations and avoiding employee overload.
- The need for continuous monitoring for key goals such as compliance, safety, or mission-critical objectives.
Provide a concise and collective assessment recommendation:
- Assessment Type: [Weekly/Biweekly/Quarterly]
- Frequency: [X weeks/biweeks/quarters]
- Justification: Explain the rationale for choosing the recommended assessment type and frequency based on the overall SOP content.
- The need for continuous monitoring of key goals, such as compliance, safety, or mission-critical objectives.
Provide a concise and collective assessment recommendation including:
- Assessment Type: Select from the provided options (e.g., if the options are ['weekly', 'monthly'], choose the most appropriate based on your analysis of the SOP).
- Duration: An integer indicating how long the assessment cycle should last (e.g., if you recommend weekly assessments for two weeks, duration = 2).
- Justification: Explain the rationale for choosing the recommended assessment type and frequency, based on the overall content of the SOPs.
Note: Predict the duration properly based the assessment type pick and the sop analysis
Example Response:
"Based on the complexity and critical nature of the tasks described in the SOPs, it is recommended that assessments be conducted biweekly for 6 biweeks. This frequency will allow for regular progress reviews without overwhelming employees, while ensuring that critical objectives such as compliance and security are met."
"Based on the complexity and critical nature of the tasks described in the SOPs, it is recommended that assessments be conducted biweekly for 6 weeks. This frequency will allow for regular progress reviews without overwhelming employees, while ensuring that critical objectives such as compliance and security are met."
'''
def predict_goal_achievement_probability_prompt():
return '''
@@ -191,3 +194,32 @@ def predict_goal_achievement_probability_prompt():
Be dynamic in your response and you do not need to write as exactly as it is the example response , just keep the format but your response after the analysis should be dynamic and professional
'''
def suggest_more_areas_prompt():
return '''
You are provided a company position and a set of areas where the employee will be performing their tasks.
Your role is to analyze the position and suggest additional areas in the range 5 - 10 that the employee should be working on to improve their performance.
Example:
Position: Data Scientist
Existing areas: Development, Testing, Communication
Suggested areas: [
"Data Exploration",
"Machine Learning",
"Data Visualization",
"Reporting"
]
Your task is to fill in the suggested areas list with relevant areas based on the position and existing areas.
Please provide the suggested areas in the following format:
Suggested_areas: [
"Area 1",
"Area 2",
...,
"Area N"
]
'''
+73 -26
View File
@@ -65,39 +65,86 @@ 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).
You are generating a variable number of assessment questions for different assessment types, which can be daily, weekly, biweekly, etc. The assessment frequency and the specific frequency number should be taken into account when generating the questions.
For a particular assessment, based on the type (e.g., daily, weekly, biweekly) and total duration (e.g., if it is weekly and the total duration is 6 weeks, generate at least 20 questions weekly for up to six weeks).
Each question will be based on the SOPs of specific workers in different departments, and the questions should vary depending on the assessment frequency type and frequency number.
The goal of the assessment is to focus on the progress of the tasks outlined in each worker's SOPs.
Make sure each question is relevant to the worker's SOP, and attach an area tag ID, aissgned_to ID, role ID, beacuse each role sop will the provided with area tags and member for that role, so questions should be generated based on that area
The questions should become more detailed or challenging as the assessment progresses over time and the question is
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).
3. Tag each question with the provided topic area ID (e.g., 1, 2, 3, 4, 5).
4. Tag each question with the provided role ID (e.g., 1, 2, 3, 4, 5).
5. Tag each question with the provided assigned_to ID (the ID of the person in charge) (e.g., 1, 2, 3, 4, 5).
4. The questions should evolve in detail as assessments progress over time.
6. For example if ans assement_type is weekly and the duration is 4, this means we generate questions for 4 weeks , frequency_number 1 to top 4 using the sop and all data
7 For each frequency_number, generate at least 15 - 20 questions.
Example response:
{
{
"questions": {
"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"
}
]
}
]
}
{
frequency_number: 1,
items: [
{
"area_tag": 5,
"assigned_to": 8,
"questions": "Has the content calendar been developed and shared with the team?",
"role": 4
},
{
}
]
},
{
     }
        ]
"""
return prompt
def get_questions_prompt_v3():
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 the provided topic area ID (e.g., 1, 2, 3, 4, 5).
4. Tag each question with the provided role ID (e.g., 1, 2, 3, 4, 5).
5. Tag each question with the provided assigned_to ID (the ID of the person in charge) (e.g., 1, 2, 3, 4, 5).
6. The questions should evolve in detail as assessments progress over time.
7. For each frequency_number, generate at least 15 - 20 questions.
Provide the response in the following JSON format:
{
"questions": {
"questions": [
{
"frequency_number": 1,
"items": [
{
"area_tag": 5,
"assigned_to": 8,
"questions": "Has the content calendar been developed and shared with the team?",
"role": 4
},
...
]
},
...
]
}
}
"""
return prompt