Run AI Prompt Rule
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
- Drag the activity from the toolbox pane and drop it in the designer pane.
- In the properties pane, type a name and description of the activity.
- In the Rule property box, select the AI Prompt rule you want to use.
- 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.
- 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.
- Reduction Strategy
- Select a reduction strategy to control the amount of information used from the history. Click here for more information on reduction strategies.
- Retention Count
- Specify the number of messages to send in the conversation history. Click here for more information on 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:
- Select an activity in the designer pane to highlight it.
- In the Description property box, clear Enable.
Tokens for Run AI Prompt Rule Activity
This activity produces the following 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.