Add a Generative AI activity

Use the following procedure to use the Generative AI functionality within your workflow solution. The Generative AI activity type is also available when configuring a true/false condition and a loop.

  1. Click below the Start node or any other node

    The Add activity dialog box is displayed.

  2. Change the default Name of the activity as required.
  3. On the Type list, select Generative AI.
    If a Generative AI provider is not already configured, a warning message appears. To configure the AI provider, navigate to the TotalAgility Apps landing page, select the Tungsten Copilot card and click Configure. You can also configure the AI providers in the TotalAgility Designer. Refer to "Integrate ChatGPT with TotalAgility" in the TotalAgility Designer Help.
  4. By default, the Generative AI appears as Title. You can change the title as needed.
  5. The Provider list includes the list of providers already configured. Select the Generative AI provider (ChatGPT OpenAI, Azure OpenAI, or Custom LLM).

    If you select an AI Agent provider, lists of (standard and additionally added) input and output variables appear.

    • You can set a static value or dynamic variable (form control, form variable, or global variable) for the input and output variables.

    • The output variable included in the standard variables is used to populate the chat control response.

  6. On the Source list, select one of the following:

    On upgrading TotalAgility from an earlier version, if the Source was set to Inline image, the Source is set to Image.

    None (default)

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

    Image

    The response is generated based on the image provided at runtime.

    All the Generative AI models do not support the use of images, including the Custom LLM.
    1. On the Document list, select either variable type.

      • Document: At runtime, the variable uses base64 string to store the content of the document.

      • String: Select either Mapping type.

        • Instance ID (default): The variable uses the instance ID of the document at runtime.

        • Data as base64 string: The variable uses content of the document as base64 string at runtime.

    2. On the Mime type list, select a file type. The supported mime types are: GIF, JPEG, and PNG (default).

    Text

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

    The response is generated based on the document passed as an input at runtime.

    On the Document list, select either variable type.

    • String: At runtime, the variable uses instance ID of the document.

    • Document (default): The variable uses the instance ID of the document at runtime.

    The following file types that are supported in the Transformation Designer are supported for the text format in TotalAgility at runtime.

    • TIFF (*.tif)

    • JPEG (*.jpg)

    • PNG (*.png)

    • PDF

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

  7. On the Response list, select a variable, such as String to hold the response for the provided input.
  8. Set the process Temperature for the AI provider. (Default: 0.5, Minimum: 0, and Maximum: 2)

    Temperature is a parameter that controls the level of creativity in the AI-generated text. You get a more focused or diverse text based on the temperature set. A higher temperature means the model takes more risks, giving you a mixed response.

  9. Specify a State to be set when the workflow reaches this point.
  10. Click Add.

    The Generative AI node is added and the properties are updated and displayed in the properties panel.

  11. When you publish the solution, the corresponding settings are populated in the generated workflow and the system does the following:
    • Passes the correct input to the selected AI provider and populates the mapped variable at runtime.

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

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