Configure a Generative AI activity

Use the following procedure to configure a Generative AI activity.

  1. Add an activity to the map.

    By default, the Configuration tab is open in the properties panel of the activity.

  2. Change the default Name of the activity as required.
  3. On the Type list, select Common > Generative AI.
  4. On the Provider list, select the Generative AI provider.

    The Provider list includes the providers configured in Integration > Generative AI. See Integrate Generative AI with TotalAgility.

  5. In the Input box, provide the input to the activity that can be a combination of plain text or variables including XML and Data object. For example, "Generate the text for an email."
    The following variables are not supported: Document, Folder, Complex, Dynamic complex, Checklist, and Data backbone.
  6. On the Source list, select one of the following:

    None (default)

    The response from the AI provider is based on the input provided (plain text or variables).

    Image

    1. On the Document list, select a document variable.

      All the Generative AI models do not support the use of images, including the Custom LLM.

    2. On the Mime type list, select the file type. (Default: PNG)

      The following mime types are supported: GIF, JPEG, and PNG.

    Text

    If the document has layout text, such as a semi structured document (invoice, purchase order, and more) or a fixed form, the document text can provide better results when compared to the results returned using a Custom LLM provider.

    On the Document list, select a document variable.

    The response is generated based on the document text passed as an input at runtime. The text is provided in an optimized (narrated) order.

    • The following file types that are supported in the Transformation Designer are supported for the text source format in TotalAgility:

      • TIFF (*.tif)

      • JPEG (*.jpg)

      • PNG (*.png)

      • PDF

    • When you set the source format as text, the standard model configuration is used.

    If the Web capture control was used as a source in TotalAgility 8.0, on upgrading, the Source format is set to Image; otherwise, the source format is set to None.
  7. On the Response list, select a variable to hold the response for the provided input.

    The response only supports simple type variables, XML, Data object, and a list within the Data object.

    Based on the variable type mapped to the response, the result is displayed. For example, if you provide the input as, "Is the sky color blue?" and a map a boolean variable as a response, the results is displayed as true, and if a String variable is mapped as a response, the result is returned as a text.

  8. Set the process Temperature for the AI provider. (Default: 0.5, Minimum: 0, and Maximum: 2)
  9. You can specify whether the job be suspended if an error is returned from the provider. Do either of the following for Suspend job on error.
    • Leave the option selected (default).

      When you export a process and import it to a target server, the Generative AI activity is executed correctly if the provider is configured with the same name as the source server and the same ID.

    • Clear the check box and map the following process variables:

      • On the Error raised list, select a boolean variable.

      • On the Status code list, select a short variable.

      • On the Error message list, select a string variable.

      When you execute the Generative AI activity and an error occurs, the activity is completed without an error and the process variable mapped to the response is not populated.

  10. Save the process map.

    When you execute this activity, the system does the following:

    • Pass the correct input to the selected AI provider and populates the mapped variable at runtime.

    • Pass the correct image or document text to the AI provider as part of the input and return the response. For example, when you upload a document and request to calculate the total amount in the document, the AI provider calculates the amount and returns the result.

    • Record an audit entry that the Generative AI activity is executed.

    • Pass the base 64 string for the document and the correct document type to the Custom LLM when the Custom LLM provider is used.