Configuring a Suggestion Prompt

Suggestion Prompt Designer

Define the prompt that will be sent to the AI engine - this is where you define the question you want to ask.

  • Create a new Suggestion Prompt by navigating to Designer Menu path separator Artificial Intelligence Menu path separator Suggestion Prompts. You will see the list of all Suggestion Prompts configured.

Basic Details

 

Label

Notes

Component

Select the component where we need to setup the Suggestion Assistant. In our example, we have selected Hazard Identification.

Destination Field

Clicking on Pick Destination Field will load up all the Text attributes for the selected Component.

Select the field that will be populated with the AI’s answer

e.g. {sys} Suggested Immediate Actions

Name

Specify a name for this Suggestion prompt

Description

Optional field to add in some description related to this prompt

Include AI Reference Data Set?

Tick this is you want your Suggestion Assistant to provide suggestions based on data held elsewhere in the system, such as historical data - using an AI Reference Dataset

NOTE: to use this option you must have already configured, and generated, an AI Reference Dataset (see previous section).

Active

Denotes if the prompt is active or not.

When ticked, that suggestion prompt is active, which means whenever any of the record fields included in the prompt are updated, the system will gather the data, send the prompt to the AI, and update the Destination Field with the results.

RAG Data

Shown only when Include AI Reference Data Set? selected.

AI Reference Data Set

Clicking on Pick Destination Field will load all of the configured AI Reference Data Sets. Select the AI Reference Dataset that you want to ask OpenAI a question about.

Retrieval Context

The Retrieval Context is the text or information from the record triggering the Suggestion Assistant, that the AI engine will use to identify relevant rows from your AI Reference Dataset.

In our example of suggesting Actions from similar historical Incidents, we want our Retrieval Context to contain the data about the Incident triggering the Suggestion Assistant, and not much else, as this text is what will be used to find relevant Incidents in the AI Reference Dataset.

For example we may just use two data placeholders:
[Incident Summary]. [Incident Description]

You can set this up with placeholder fields and the system will substitute the values from the record.
Comply click [Select Field] to see a list of available placeholders and select those that you want to include in your Retrieval Context prompt.

Retrieval Sample Size

This is an advanced option.

Retrieval Sample Size defines how many rows from your AI Reference Dataset will be retrieved initially, and passed into the main Prompt.

Cosine Similarity

This is an advanced option.

Cosine Similarity determines how ‘similar’ the AI Reference Dataset needs to be to your Retrieval Context, for it to the retrieved and used in your prompt. Lower values mean the definition of similar is more lenient, higher values mean it is stricter. The setting will override the default setting. Refer to OpenAI’s website for more information.

Prompt

 

Prompt

This is the space where you can define the text that will be sent to the AI engine. You can set this up with placeholder fields and the system will substitute the values from the record and send it to the engine.

Example Prompt (Basic Suggestion Assistant):

I have just identified this hazard: "[Summary]. [Detailed Description]" What immediate action should I take to ensure a safe workplace?

Please limit your response to 3 suggestions, no more than 100 words in total

 

In the above example, the system will replace [Summary] and [Detailed Description] with values entered in the Hazard Identification record.

 

Example Prompt (RAG Suggestion Assistant):

QUESTION:

This Incident was just reported: '''[Summary]. [Detailed Description]'''

Identify three Incidents that are relevant to this one.

 

INSTRUCTIONS:

When referring to specific people, never use their actual names in your responses.

Summarize your reasoning on why each Incident is similar, and detail the Actions that were taken in each case.

Do not repeat Incidents in your response - just include each incident once, showing the Incident ID, a brief incident summary (max 10 words) and your reasoning for including it, and list the relevant actions underneath (including the Action ID).

Please ensure your response is less than 200 words.

Keep your answer grounded in the facts of the INCIDENT_DATA.

 

INCIDENT_DATA:

##AIReferenceDataSet##

 

In the above example, the system will replace [Summary] and [Detailed Description] with values entered in the Incident record being worked on.

Note: Prompts for RAG Suggestion Assistants also include a special placeholder ##AIReferenceDataSet## which will substitute in all the rows from your AI Reference Dataset that were retrieved from the Retrieval Context.

OpenAI

This is an advanced option.

Use this setting to choose which OpenAI model is used for the prompt. This setting will override the default setting (defined in Global Settings). Refer to OpenAI’s website for more information.

OpenAI Temperature

This is an advanced option.

Use this setting to choose the OpenAI ‘Temperature’ to use for the prompt. This setting will override the default setting (defined in Global Settings). Refer to OpenAI’s website for more information.

General Context

In addition to setting up the Suggestion Prompt, you can also define a General Context under Designer Menu path separator Artificial Intelligence Menu path separator General Context

This information will be sent as a preface for all the Suggestion Prompts to set the context with the AI engine.

An example General Context is:

Our company is a Western Australian energy utility company - Please ensure any responses take this into account.
Please use direct "business" language in all responses.

See Also

Suggestion Assistant

Configuring the Fields

Configuring an AI Reference Dataset

Configuring a Suggestion Assistant on a Form

How it works