Run AI Prompt Rule

Run AI Prompt Rule activity

This activity allows you to run an AI Prompt rule in your workflow definition. When the workflow runs, the activity takes one or more values from earlier in the workflow as inputs to the rule. The activity passes the inputs to the AI model which produces a result. The result is stored in a Conversation Response token. You can use the resulting tokens elsewhere in your workflow process.

To set up this activity

  1. Drag the activity from the toolbox pane and drop it in the designer pane.
  2. In the properties pane, type a name and description of the activity.
  3. In the Rule property box, select the AI Prompt rule you want to use.
  4. In the Parameters section, select tokens from where the input value(s) will be supplied.

Additional Settings

Conversation History

Select Enable Conversation History to allow the Run AI Prompt Rule to start or continue conversations in other Run AI Prompt Rule activities. Click here to read more about conversation history.

  1. Conversation Id
    • To start a conversation, put a value in the Conversation ID or leave it empty. The rule will then output the same Conversation ID if it was filled in, or a random GUID if it was left blank. You can then use this Conversation Id in a following AI Prompt Rule to continue the conversation you had in the first one, sending all previous prompts and responses to get the appropriate context.
  2. Reduction Strategy
  3. Retention Count

Note: Conversation History is only tracked within an instance of workflow and only kept for 14 days.

You may want to disable activities if you only want to test specific sections of your workflow. To disable activities:

  1. Select an activity in the designer pane to highlight it.
  2. In the Description property box, clear Enable.

Tokens for Run AI Prompt Rule Activity

This activity produces the following tokens:

Tokens
Name Description Sample Syntax*
Conversation Response The response from the AI Model.

Note: There will only be one conversation response for each run of the rule. See the best practices for information on parsing a response into a multi-value token.

%(RunAIPromptRule_ConversationResponse)
Conversation ID The ID of the current conversation. Used to continue the conversation in additional AI Prompt Rules. Null if Enable Conversation History is unchecked. %(RunAIPromptRule_ConversationId)

* The "RunAIPromptRule" portion of the syntax changes to match the activity's name.

Note: Only the default AI prompt rule tokens are defined here. Output parameters and additional custom tokens defined within the rule will appear as additional available tokens to the workflow, following the syntax "%(RunAIPromptRule_ParameterOrTokenName)" as defined in the previous note.

See Also:

Getting Started with AI-Assisted Prompt Rules