Group-Related Use Cases

The group-related use cases involve the generation of text-based AI content for product hierarchies and product classifications based on data from those groups and all products that belong to them.

An individual group can be associated with multiple prompts, and each prompt can be used for any number of different groups. Prompts are executed by triggering a relevant group, which can be done in a variety of ways, such as a step within a workflow, as part of an import, or as part of an event processor process.

Once the group is triggered and an output is generated by the AI, it is saved in the dedicated prompt output attribute on the relevant group. Next, the group is pushed into the Generative AI Review workflow to review the prompt output. The user can customize which workflow or workflow step the group is pushed to when the output is generated.

Group related prompts

Prompt GAIDGRP01 generates a title for the group based on existing group data and data of all products that belong to it.

Prompt GAIDGRP02 generates a description for the group based on existing group data and data of all products that belong to it.

Prompt engineering

A prompt is defined by its input, such as any relevant attributes, instructions, and the groups which reference the prompt. Prompt input may include:

  • Parameters

  • Mandatory group-input attributes and product-input attributes

  • Persona, target audience, and message tone

  • Attribute group output

  • Output attributes and maximum number of characters

The most straightforward way to create a new prompt is to copy an existing one, duplicate output and target attributes for it, add them to the relevant List of Values (LOV), and then edit the new prompt.

The group input and output attributes used in each prompt get their selectable values from an LOV. The easiest method for creating a new input / output attribute is to duplicate an existing one and add the ID for the new group input / output attribute and the name of the LOV.

Automating the execution of prompts

By default, executing a prompt to generate an output is done by manually selecting the Generate AI Output button, which executes a business rule and generates an event in the event processor. To automate prompt execution, use the code of the business rule which generates events for the event processor either as part of an import, as part of an existing workflow, or as part of another existing process or business rule.

Embed into existing workflow

By default, after the AI output is generated, the solution initiates groups into workflows called AI Review Workflow - Grouping Blue to Text for product hierarchies and AI Review Workflow - Grouping Yellow to Text for product classifications. If desired, this can be changed to another existing workflow or workflow state. To accomplish this, the user must edit the business rule GenAI - Text for Groupings – Generate Output and change the variable “aiReviewWorkflowBlue” or “aiReviewWorkflowYellow” to the ID of the desired workflow. To initiate the product into a specific state of the workflow, change the code under “Initiate in Ai Review or Error Workflow”.

Automatically copy output to target attribute

By default, the business rule responsible for copying the generated output to the target attribute on a group is GenAI – Text for Groupings – Copy Output to Target. If desired, this can be changed to another attribute by enhancing the business rule with, for example, a lookup table that matches output and target attributes.