Execute action

Citizen Developers and Pro Developers have access to the Generative AI Prompt Template package in the Bot editor based on licensing and role.

The Automation Admin creates a custom role to assign access to Prompt Templates to the users based on their role and task. A Prompt Template consists of a Model connection (connecting to a foundational model), Prompt (consisting of a fine-tuned prompt), and Prompt Input (values defined in the Prompt Template by the Pro Developer when creating it). The prompt input values can be entered directly within the automation.

Users can invoke the Execute action action in their automation by navigating to Generative AI Prompt Template > Execute, and selecting a Prompt Template from the available list.
注: Use Bot Agent v22.60.10 and above to run your bots successfully.

Prerequisite

  • You require the Bot_Creator and Bot_Runner role to use the Generative AI Prompt Template > Execute action.
  • You must have access to the relevant folders (whether Private or Public) to access the Prompt Templates.

Procedure

The following steps show you how to use the Generative AI Prompt Template > Execute action in an automation.
  1. Log in to the Control Room and navigate to Automation > Create new or ‘+’ icon and choose Task Bot. You can also edit an existing Task Bot by accessing it from the Automations tab.
  2. In the Bot editor, add the Generative AI Prompt Template > Execute action to the automation.
  3. Next, click the Execute action in the automation flow to display the details panel.
  4. Click Choose and select a Prompt Template from the list you have access to, in your repository.
  5. When you select a Prompt Template, the Prompt field gets populated with the prompt text from the Prompt Template.

    Generative AI Prompt Template > Execute action details

  6. The Prompt Template inputs field also gets enabled and displays the input values defined in the Prompt Template. For example, if the Prompt Template has two input values defined, then you would see both the input value fields.
    You can define a variable for the Prompt Template inputs field which gives you the ability to parse information to the Prompt Template and get a response back from the model. The Prompt Template executes the prompt based on the value entered in this field and returns values for the following fields. These are optional fields and can be defined using ‘If’ variables as per your use case:
    1. Save the response to a variable (optional): Displays the response received from the prompt execution. This is the output value.
    2. Error (optional): Captures the error status. You can define an ‘If’ variable based on the Save the response to a variable output field and define the condition required to see an error message.
    3. Success Status (optional): Captures the success status. Like the Error field, you can define an ‘If’ variable based on the Save the response to a variable output field and define the condition required to see a success message.
    注: Prompt data details could contain PHI, PII or other sensitive data you choose to enter in the Prompt. We recommend being mindful of this when testing and executing a Prompt.
  7. Save the automation. Then run and test the automation.