{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":23040,"path":"intelligent-experiences/configure-gaf.md","title":"Configure Group Action Framework","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure Group Action Framework\n\nSet up Group Action Framework \\(GAF\\) to improve the response quality, recall speed, and consistency of AI agents.\n\n## Before you begin\n\nThere 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.\"\n\nVerify that your configured LLM provider \\(such as OpenAI or Anthropic\\) has valid credentials and available token quota.\n\nVerify that the prerequisite scheduled job for your workflow exists and is properly configured. For example, if you're configuring GAF for HR Service Delivery, navigate to **All** &gt; **System Definition** &gt; **Scheduled Jobs** and search for \"HR service GAF grouping job\". Verify that the **Active** field is set to true and that the **Class** field is populated. If either field is empty, the job will not execute.\n\nTo access GAF's optimized prediction feature, you can enable AI Search. For more information, see [Setup AI Search for Group Action Framework](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/intelligent-experiences/setup-ai-search-gaf.md).\n\nRole required: sn\\_aia.admin\n\n## About this task\n\nYou 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 [Group Action Framework](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/intelligent-experiences/group-action-framework.md).\n\nYou can have different GAF configurations for different agentic workflows and applications. You must configure each agentic workflow or application separately.\n\n**Important:** 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.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Definition** &gt; **Scripts - Background**.\n\n2.  Paste the following code into the text area.\n\n    Do not run the script until the groupSkillID and the actionSkillID variables have values. The values are acquired in the following steps.\n\n    ```\n    var groupSkillId = \"\"; \n    var actionSkillId = \"\"; \n    var topicSkillId = \"43bce9e477e012103f075cea5b5a998f\"; \n    new sn_gaf.GAFUtils().activate(groupSkillId, topicSkillId, actionSkillId, \"run_once\");\n    ```\n\n    The topicSkillId is the same for all GAF setups.\n\n3.  In a new browser tab, navigate to the Now Assist Skill Config \\[sn\\_nowassist\\_skill\\_config\\] table by entering `sn_nowassist_skill_config.list` in the filter navigator.\n\n4.  In the **Name** field, enter `*grouping` and search to see the grouping records that are associated with your agentic workflows and applications.\n\n    \\[Omitted image \"gaf-grouping-search.png\"\\] Alt text: Now Assist Skill Config table filtered by \\*grouping in the Name field\n\n5.  Open the grouping record for the agentic workflow or application that you want to configure.\n\n6.  In the Now Assist Config Var Set related list, open the Grouping inputs record.\n\n7.  Confirm that the filters for the grouping include all the records you want to index.\n\n    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.\n\n    **Note:** Your current scope should be Group-Action Framework to make changes.\n\n    \\[Omitted image \"gaf-grouping-inputs.png\"\\] Alt text: Now Assist Skill Config Var Set record with Variables set to Incident table, short description field, and filter State is closed\n\n8.  Return to the Now Assist Skill Config Grouping record and copy the sys\\_id.\n\n    You use this sys\\_id and two other sys\\_ids in the background script function call.\n\n9.  In the browser tab with the background script, paste the sys\\_id in the script between the quotation marks for the groupSkillId variable.\n\n    Your `groupSkillId` variable should be in the same format as the `topicSkillId` variable.\n\n10. In the tab with the Now Assist Skill Config record, return to the Now Assist Skill Config table and search for `*action strategy` to find the action strategy skill config for the application.\n\n    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.\n\n11. Open the action strategy record for the application that you’re configuring.\n\n    **Note:** The Group table field should be left empty. The Group table refers to the table where the grouped records are, not the source table, so the field is populated automatically by the GAF setup job. If this field is populated before you run the script, the GAF job will fail.\n\n12. Copy the sys\\_id of the action strategy record.\n\n13. In the browser tab with the background script, paste the sys\\_id in the script between the quotation marks for the actionSkillId variable.\n\n    Your `actionSkillId` variable should be in the same format as the `groupSkillId` and `topickillId` variables.\n\n    \\[Omitted image \"gaf-script.png\"\\] Alt text: Completed GAF script with all three values populated\n\n14. Run the background script by selecting **Run script**.\n\n    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.\n\n\n## Result\n\nGAF is configured on your instance for an application and can be used by AI agents to find related records.\n\n## What to do next\n\nTo 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.\n\n-   GAF record group \\[sn\\_gaf\\_record\\_group\\]\n-   GAF record group detail \\[sn\\_gaf\\_record\\_group\\_detail\\]\n-   GAF action strategy result \\[sn\\_gaf\\_action\\_strategy\\_result\\]\n\nYou can repeat this procedure for additional agentic workflows and applications.\n\nYou 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 Now Support for additional assistance if you cannot resolve this error.\n\n"}}