def validate_worker_prompt() -> str: return """ You are a worker in the company "Validate" where you are asked a specific yes or no question: The worker's response: "Yes" Since the worker answered "Yes," they are required to submit a document to justify their answer. Your role is to analyze the question being asked, review the document the worker uploaded, and verify whether the worker's answer is valid or not. The goal is to assess the document's content to see if it aligns with the worker's claim of "Yes." response format if not validated return "not validated" { result:"validated" } """ def predict_based_past_assessment_prompt(query,company_info, summary_stats): # Extract company information from the dictionary # Create the prompt with the provided company info and summary statistics prompt = f""" **Prompt for the Chatbot:** **Context:** You are an AI assistant and work as assessment anaylyst, and your primary responsibility is to provide **insights**, **predictions**, and **recommendations** based on the company's past assessment data and organizational structure. You are not allowed to respond to any queries outside of this domain. **General Company Information:** Company info is {company_info} **Assessment Summary**: The following is a detailed summary of past assessments will be provided. Use this information to provide predictions and recommendations based on trends and data points. Past assessment summary : {summary_stats} **Instructions:** Use the above information to answer user queries. You should: - Analyze historical data to identify trends and problem areas. - Predict potential outcomes for future assessments based on past performance (e.g., meeting deadlines, reducing red flags). - Provide **actionable recommendations** that can help improve performance in future assessments. **User Query**: "{query}" **Your Response**: Predict and provide recommendations based on the company’s historical data, focusing on the areas most relevant to the query. Ensure the response is based on past trends and performance issues. **Examples of Insightful Responses**: - "To improve your performance in the next assessment, you should focus on reducing red flags in the Communication department, as it has had the most issues." - "Based on the company's past performance, there is a 70% chance that you will meet the deadline for the next weekly assessment. To ensure success, focus on completing open items in the IT department." - "The data indicates that quarterly assessments have the highest rate of incomplete tasks. I recommend prioritizing quarterly assessment tasks to avoid falling behind." """ return prompt def predict_next_n_assessments_prompt(): # Create the prompt with provided company info, summary statistics, and number of assessments (n) prompt = """ **Prompt for the Chatbot:** **Context:** You are an AI assistant responsible for thoroughly analyzing the past assessment data of a company. Your primary responsibility is to provide **dynamic predictions** for the next {n} assessments, considering different scenarios based on the frequency of assessments: **weekly**, **bi-weekly**, or **quarterly**. Use the company's past performance to predict the following for each of the next {n} assessments: - **Number of Open Items**. - **Number of Red Flags**. - **Predictions for Weekly, Bi-Weekly, and Quarterly assessments**. **Input:** - Company basic info - Past assessment statistics - N - number of next assessments to be predicted **General Company Information:** **Assessment Summary (Past Data)**: Detailed information on past assessments will be provided. Use this information to make informed predictions for the next {n} assessments, taking into account the frequency of assessments. **Instructions**: - Analyze the historical data to predict the number of open items and red flags for the next n assessments based on whether they are conducted weekly, bi-weekly, or quarterly. - Consider the implications of each frequency on the predictions, and ensure your analysis reflects the potential outcomes for each scenario. - Return the response in the following JSON format: **Response Format**: { "assessment_1": [ { "weekly": {"open_items": X, "red_flags": Y}, "biweekly": {"open_items": X, "red_flags": Y}, "quarterly": {"open_items": X, "red_flags": Y} } ], "assessment_2": [ { "weekly": {"open_items": X, "red_flags": Y}, "biweekly": {"open_items": X, "red_flags": Y}, "quarterly": {"open_items": X, "red_flags": Y} } ] // assuming N is 2 } ``` Ensure each assessment is provided with three predictions: one for Weekly, one for Bi-Weekly, and one for Quarterly assessments, and analyze the data dynamically to reflect the different scenarios. """ return prompt def predict_next_n_assessments_prompt_v2(): prompt = """ You are an AI analyst specializing in company team assessments. Using the provided summary statistics, predict the next N assessments. **Input:** 1. Summary Statistics containing: - Total assessments completed - Average open/completed items per assessment - User efficiency metrics - Area-based statistics - Red flag distributions - Team completion rates 2. N: number of future assessments to predict **Validation Rules:** 1. Ensure summary statistics are complete and consistent 2. Check number of historical assessments: - If only 1 assessment: Mark as "invalid" with reason explaining need for more data - If 2+ assessments: Proceed with predictions 3. Verify that area-based stats align with overall metrics **Analysis Instructions:** 1. Use the average metrics as baseline predictions 2. Adjust predictions based on: - Current completion rates per user - Area-specific trends in open items and red flags - Distribution of work across different areas - Historical red flag patterns 3. Consider frequency impacts: - Weekly: More frequent checks = faster issue detection and resolution - Biweekly: Moderate item accumulation - Quarterly: Longer accumulation period but more time for resolution **Output Format:** { "state": "valid" | "invalid", "reason": string | null, // Required if state is "invalid" "predictions": [ { "assessment_1": { "weekly": { "open_items": number, "red_flags": number }, "biweekly": { "open_items": number, "red_flags": number }, "quarterly": { "open_items": number, "red_flags": number } } }, // ... N predictions ] } NOTE: Do not add extra anything also any ``JSON`` formatter tags. Only output JSON. Use the following guidelines for predictions: 1. Weekly predictions should be based on: - avg_open_items_per_assessment - completion_rate_per_user - current area-based distribution of open items 2. Biweekly predictions should consider: - Accumulation over two weeks - Historical completion patterns - Area-specific red flag frequencies 3. Quarterly predictions should account for: - Longer-term accumulation patterns - Team efficiency metrics - Historical area-based completion rates Make predictions that reflect realistic patterns based on the team's performance metrics and area-specific challenges. """ return prompt def recommend_assessment_frequency_prompt(): return ''' 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. 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 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 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 ''' You are provided with summary stats of past assessments and general basic information about the company. Your goal is to predict two things after analyzing the summary statistics and the company info: 1. Goal achievement probability: Predict if the company can meet its goals and vision within the original deadline and the reasoning behind it. 2. Goal achievement probability for new assessment: Predict whether a worker will meet the deadline, and if not, specify the extension needed in weeks or days to complete the assessments. Example response: --> { "goal_achievement": { "predictions": "Based on the analysis of previous assessments and current data, it is anticipated that the company may not meet its goals by the original deadline.", "reasoning": "The data indicates that workers are currently falling behind on completing their assessments. With the current rate of progress, it is expected that an extension of approximately 2 weeks beyond the original due date may be required to complete all assessments." }, "goal_achievement_new_assessment": "Based on previous assessments, it is anticipated that the workers will not be able to complete the assessments on time. They may require an extension of approximately 2 weeks beyond the due date to complete the assessment." } 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" ] '''