Best Practices for Generative AI with ServiceNow

As the use of Generative AI becomes more prevalent in various applications, it’s essential to adhere to best practices to ensure the responsible and effective deployment of such technologies. Here are some general best practices for the Generative AI Controller of ServiceNow:

 

1. Source Identification: 

Include information about the source of the generated text using Flow Designer, Virtual Agent, or UI action. For example, indicating whether the text was generated by Azure OpenAI or OpenAI can provide transparency and accountability.

 

2. Input and Output Sanitization:

Always sanitize the input and output from generative AI providers to ensure that malicious content is not stored in the application. Input/output sanitization is essential for maintaining data integrity and security within the application.

 

3. Sensitive Data Handling:

Configure sensitive data handling for generative AI by creating and updating sensitive data regex records with patterns to prompt for appropriate handling of sensitive information.

4. OneExtend Builder Capabilities: 

When utilizing OneExtend Builder Capabilities, check for related list records under OneExtend Builder Config and ensure that only one provider is chosen as the default for a capability.

 

5. Flows Designer – Flows & Actions: 

– Flows should run as the user who initiated the session.

– Ensure that the input to the Generative AI Provider is always a string, and cast the input as a string if necessary. For example, in the “summarize” action used in a flow, cast the input to a string with scripting or add text to the “textToSummarize” field in addition to the data pill.

 

textToSummarize in Flow Designer

 

 

6. LLM Summarization: 

If using LLM for summarization on a record such as an incident record, consider enabling recursive summarization for fields like activity fields which have large data. This feature helps to break down the information given to an LLM into chunks, and summarizes each chunk individually. The chunks are organized with overlaps between the pieces so that the context is retained across every piece. However, note that enabling recursive summarization may cause the capabilities to process large inputs more slowly because they must make multiple calls to the LLM instead of just one call.

 

7. System Properties:

After installing the Generative AI Controller, it’s crucial to set values for a few system properties: com.sn.generative.ai.provider, com.sn.generative.ai.ais.message, com.sn.generative.ai.log_prompt, com.sn.generative.ai.moderation.message, com.glide.one.extend.token.buffer.

 

8. Virtual Agent:

In the OneExtend Builder Config [sys_one_extend_builder_config] record for Virtual Agent Designer‘, ensure that the execution mode is set to “Async”. Also, under the OneExtend Builder Capabilities related list, check for the following points:

– Default field: Determines whether the capability definition is the default. You can have multiple OneExtend Builder Capability records, but only one record per capability may have a default set to true at a time.

– Execution mode field: Determines when a capability is executed in relation to other processes. Select the “Async” option only because the “Sync” and “Fire and Forget” options do not work.

 

 

OneExtendBuilderConfigRecord for Virtual Agent

 

 

9. Legal and Ethical Considerations:

Be mindful of legal and ethical considerations when using generative AI. Respect copyright laws, privacy rights, and other regulations governing the use of data and content.

 

10. Domain Separation:

Domain separation is supported for the Generative AI Controller at the generative AI OneExtend capability level. When creating a copy of an existing generative AI capability in a different domain, ensure that you create a record in the OneExtend Capabilities (sys_one_extend_capability) table. After you create the OneExtend Capability record, you must create records for the following attribute and config records in the new domain:

– OneExtend Capability Attribute records with the same values as the capability in the global domain.

– A OneExtend Capability Definition that corresponds to the new capability.

– A OneExtend Definition Config definition record that includes the OneExtend Capability Definition for the new domain.

– Also, the OneExtend Capability Definition record that you add must be the same as the capability that you want in the new domain. For example, if you’re creating a capability in a new domain for sentiment analysis, you could add the Sentiment Analysis (OpenAI Completion) record. Adding the Summarize (OpenAI Completion) Config could result in unexpected behaviour. The OneExtend Definition Config record that you select should include the OneExtend Capability Definition record that you added.

Date Posted:

May 31, 2024

Share This:

Leave A Comment

Categories

Tags

Loading

Related Posts

Fresh Content
Direct to Your Inbox

Just add your email and hit subscribe to stay informed.