Rationale behind AI Identified Risk Generation in Project Workspace RIDACIssue AI-identified risks appear empty under RIDAC in Project Workspace when generating risks. We need to understand the rationale and technical configuration behind the 'Generate Risk' button functionality. Steps to reproduce include navigating to the project in the project workspace, selecting RIDAC, and attempting to generate AI risks. This often results in no risks being generated. Release All releases Cause Why the AI-identified risk list can end up empty:Short explanation1. No project data exceeds configured thresholds for task delays, milestone issues, resource allocation, or financial variances, resulting in no risks being flagged.2. Identified issues are already covered by existing risks, preventing new AI-generated risks from being created.3. Insufficient project content or formatting errors in the AI response may cause the system to return no risks.4. User lacks permission to create risk records due to ACL restrictions on the risk table.Longer explanationCause 1 -The project data does not cross any configured threshold. Risks are generated only from issues found in project tasks, milestones, resource assignments and financials, based on the thresholds defined in the risk assessment configuration (for example, tasks or milestones delayed by at least 1 day, resources allocated above 101 percent, or a budget or cost variance). If no issue is found, the AI is instructed to return no risks.Where - NARIDACGenerationDataProvider.getRIDACRiskAssessmentConfig() (script include function)Cause 2 -The identified issues are already covered by existing risks on the project. The AI is instructed not to create risks that duplicate or overlap risks already on the project, including AI risks that were accepted earlier.Where - Project RIDAC generation skill (prompt instructions)Cause 3 -There is not enough project content for the AI to provide insights. In this case the request returns the message "There is not enough content for AI to provide insights" and no risks are created.Where - NARiskGenerationLLMService.errorHandler() (script include function)Cause 4 -The AI response contains no risks, or the response is not in the expected format. Risks are read only from the "risks" list in the AI response. If the list is empty or the response cannot be read, the message "No risks were generated" is shown.Where - NARiskGenerationLLMService._extractRisks() (script include function)Cause 5 -The user does not have permission to create risk records. Risks are saved using the logged-in user's access rights. If a create ACL on the risk table blocks the insert, the record is not created and no error is shown.Where - NARisksGenerationDataService.saveRisks() (script include function) Resolution 1. Verify project data against predefined thresholds for tasks, milestones, resources, and financials to ensure issues meet criteria for risk generation.2. Check if existing risks already cover identified issues to avoid duplicates.3. Run the provided background script to analyze project context and AI response.Steps:1. Navigate to System Definition > Scripts - Background.2. Set the scope to sn_spm_gen_ai.3. Replace the value of pid with the sys_id of your project.4. Paste the script and select Run script.Here is the background script:var pid = '<project_sys_id>';var tbl = 'pm_project';var svc = new sn_spm_gen_ai.NARiskGenerationLLMService();var ctx = svc.preProcessor(pid, tbl);gs.info('[CTX] ' + JSON.stringify(ctx));var raw = svc.generateRisks(pid, tbl);gs.info('[RAW] ' + JSON.stringify(raw));var res = svc.postProcessor(raw);gs.info('[POST] hasError=' + res.hasError + ' | msg=' + res.message + ' | risks=' + (res.risks ? res.risks.length : 0));gs.info('[ACL] risk canCreate=' + new GlideRecordSecure('risk').canCreate());How to read the output:[CTX] shows the project issues collected for the AI (task_insights, milestone_insights, resource_insights and financial_insights). If these are empty, the AI has nothing to create risks from.[RAW] shows the AI's response. Look for "risks" in the response text. "risks":[] means the AI found no new risk.[POST] shows the final result. risks=1 or more means risks were generated, and hasError=true shows that the request failed.[ACL] shows whether the user running the script is allowed to create risk records.Please note:This script does not create, update, or delete any risk records. It only shows the data and the AI response.Each run makes one call to the AI and consumes 1 Now Assist assist.