<h2>Configure Group Action Framework</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="task" /><meta name="DC.title" content="Configure Group Action Framework" /><meta name="abstract" content="Set up Group Action Framework (GAF) to improve the response quality, recall speed, and consistency of AI agents." /><meta name="description" content="Set up Group Action Framework (GAF) to improve the response quality, recall speed, and consistency of AI agents." /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2025-02-19T14:51:07-05:00" /><meta name="DC.date.modified" content="2025-02-19T14:51:07-05:00" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="configure-gaf" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Configure Group Action Framework</title></head><body id="configure-gaf"> <h1 class="title topictitle1" id="ariaid-title1">Configure Group Action Framework</h1> <div class="body taskbody"><p class="shortdesc">Set up Group Action Framework (GAF) to improve the response quality, recall speed, and consistency of AI agents.</p> <div class="section prereq p" id="configure-gaf__task-prereq"> <p class="p">There must be a ml_platform read ACL for GAF to be configured. If there is no read ACL present, you must create it and grant the appropriate role access, such as admin, ml_admin, or sn_aia.admin. This is required for GAF to access Machine Learning tables and services. If your ACL is not configured correctly, you may see the error "Failed to initialize pipeline: Failed to load message_content dataset. No columns to parse from file."</p> <p class="p">To access GAF's optimized prediction feature, you can enable <span class="ph">Now Assist</span> in <span class="ph">AI Search</span>. For more information, see <a class="xref" href="setup-ai-search-gaf.html" title="Configure AI Search to enable Group Action Framework (GAF) to improve quality and consistency of agentic AI and Now Assist generative AI on the Now Platform.">Setup AI Search for Group Action Framework</a>.</p> <p class="p">Role required: sn_aia.admin</p> </div> <div class="section context"> <p class="p">You can activate GAF to have AI agents use indexed clusters that perform LLM executions on representative records rather than all records. GAF is used by some AI agents and agentic workflows to work optimally. For more information about GAF and how it works, see <a class="xref" href="../concept/group-action-framework.html" title="Group Action Framework (GAF) is an intelligence feature on the ServiceNow AI Platform that groups related records and applies actions to them using LLMs.">Group Action Framework</a>.</p> <p class="p">You can have different GAF configurations for different agentic workflows and <span class="ph">Now Assist</span> applications. You must configure each agentic workflow or application separately.</p> <div class="note important"><span class="importanttitle">Important:</span> Setting up GAF can take some time, between 10 minutes up to an hour, depending on the number of records in the grouping. The script runs in the background.</div> </div> <ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">Navigate to <span class="ph menucascade"><span class="ph uicontrol">All</span> > <span class="ph uicontrol">System Definition</span> > <span class="ph uicontrol">Scripts - Background</span></span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Paste the following code into the text area.</span> <div class="itemgroup info"><p class="p">Do not run the script until the groupSkillID and the actionSkillID variables have values. The values are acquired in the following steps.</p> <pre class="pre codeblock"><code>var groupSkillId = ""; var actionSkillId = ""; var topicSkillId = "43bce9e477e012103f075cea5b5a998f"; new sn_gaf.GAFUtils().activate(groupSkillId, topicSkillId, actionSkillId, "run_once");</code></pre> <p class="p">The topicSkillId is the same for all GAF setups.</p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">In a new browser tab, navigate to the <span class="ph">Now Assist</span> Skill Config [sn_nowassist_skill_config] table by entering sn_nowassist_skill_config.list in the filter navigator.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the <span class="ph uicontrol">Name</span> field, enter *grouping and search to see the grouping records that are associated with your agentic workflows and <span class="ph">Now Assist</span> applications.</span> <div class="itemgroup info"> <p class="p"><img class="image" width="800" src="../image/gaf-grouping-search.png" alt="Now Assist Skill Config table filtered by *grouping in the Name field" /></p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Open the grouping record for the agentic workflow or application that you want to configure.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the <span class="ph">Now Assist</span> Config Var Set related list, open the Grouping inputs record.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Confirm that the filters for the grouping include all the records you want to index.</span> <div class="itemgroup info"> <div class="p">If you want to add filters to change what records are included in the GAF setup, do so here. The more records that you include means that you have a longer setup time, but they can help increase the quality of your results. You should have at least 2000 records for successful clustering.<div class="note"><span class="notetitle">Note:</span> Your current scope should be Group-Action Framework to make changes.</div> </div> <p class="p"><img class="image" width="800" src="../image/gaf-grouping-inputs.png" alt="Now Assist Skill Config Var Set record with Variables set to Incident table, short description field, and filter State is closed" /></p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Return to the <span class="ph">Now Assist</span> Skill Config Grouping record and copy the sys_id.</span> <div class="itemgroup info">You use this sys_id and two other sys_ids in the background script function call.</div> </li><li class="li step stepexpand"> <span class="ph cmd">In the browser tab with the background script, paste the sys_id in the script between the quotation marks for the groupSkillId variable.</span> <div class="itemgroup stepresult"> <p class="p">Your <code class="ph codeph">groupSkillId</code> variable should be in the same format as the <code class="ph codeph">topicSkillId</code> variable.</p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">In the tab with the <span class="ph">Now Assist</span> Skill Config record, return to the <span class="ph">Now Assist</span> Skill Config table and search for *action strategy to find the action strategy skill config for the application.</span> <div class="itemgroup info">Make sure that the record is for the same application. If you pasted the sys_id of the GAF ITSM grouping, you must open the GAF ITSM action strategy.</div> </li><li class="li step stepexpand"> <span class="ph cmd">Open the action strategy record for the application that you’re configuring.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Copy the sys_id of the action strategy record.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the browser tab with the background script, paste the sys_id in the script between the quotation marks for the actionSkillId variable.</span> <div class="itemgroup stepresult"> <p class="p">Your <code class="ph codeph">actionSkillId</code> variable should be in the same format as the <code class="ph codeph">groupSkillId</code> and <code class="ph codeph">topickillId</code> variables.</p> <p class="p"><img class="image" width="800" src="../image/gaf-script.png" alt="Completed GAF script with all three values populated" /></p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Run the background script by selecting <span class="ph uicontrol">Run script</span>.</span> <div class="itemgroup info"> <p class="p">Running this background script creates a scheduled job called GAF - Run Offline Flow. You can view the scheduled job on the Scheduled Script Executions [sysauto_script] table. If you want to run the script immediately, open the Scheduled Script Execution record and select <span class="ph uicontrol">Execute Now</span>.</p> <p class="p">The script runs in the background.</p> </div> </li></ol> <div class="section result"> <p class="p">GAF is configured on your instance for that <span class="ph">Now Assist</span> application and can be used by AI agents to find related records.</p> </div> <div class="section postreq"> <p class="p">To verify that grouping and action outputs have been generated, go to the ML Solution [ml_solution] table to check if the clustering solution is running or completed. If it is complete, check the following tables to see records for groups, clustered records, and down-sampled records per group are present.</p> <ul class="ul"><li class="li">GAF record group [sn_gaf_record_group]</li><li class="li">GAF record group detail [sn_gaf_record_group_detail]</li><li class="li">GAF action strategy result [sn_gaf_action_strategy_result]</li></ul> <p class="p">You can repeat this procedure for additional agentic workflows and <span class="ph">Now Assist</span> applications.</p> <p class="p">You may see the error "Failed to initialize pipeline: Failed to load message_content dataset. No columns to parse from file." when trying to configure GAF. This could be because your instance lacks data on the table or filters you configured excluded records from the table. You can reach out to <span class="ph">Now Support</span> for additional assistance if you cannot resolve this error.</p> </div> </div> </body></html></div>