Attribute Value Translation Use Cases
The attribute value translation use cases involve the generation of text translations for attribute values, and includes prompts that generate output for search terms and marketing descriptions.
An individual product can be associated with multiple prompts, each responsible for translating different attributes, and each prompt can be used for any number of different products. Prompts are executed by triggering a relevant product, 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. Additionally, multiple products can be triggered at once if included in a collection when initiating a bulk update. This should only be done once the prompts have been finalized via prompt engineering (see below).
Once the product is triggered and an output is generated by the AI, it is saved in the dedicated prompt output attribute on the relevant product. Next, the product is pushed into the Generative AI Review workflow so the user can review the prompt output. The user can customize which product workflow or workflow step the product is pushed to when the output is generated.
Currently, the only supported source language is English, which can be translated into German, French, and Dutch as part of the standard solution offering.
Translation prompts
Prompt att_GENAIPTTT01_SearchTerms translates search terms associated with relevant products.
Prompt att_GENAIPTTT02_MarketingDescription translates marketing description attribute values.
Prompt engineering
A prompt is defined by its input, such as any relevant attributes, instructions, and the products which reference the prompt. Prompt input may include:
-
Parameters
-
Attributes to translate
-
Language(s)
-
Persona, target audience, and message tone
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 product attributes to translate and the language used in each prompt get their selectable values from an LOV. The easiest method for creating a new product attribute to translate or language is to duplicate an existing one and add the ID for the new product attribute / language and the name of the LOV. The relevant LOVs for these use cases are Attributes to translate (product attribute value) and Language(s) to translate to (corresponding with context).
Note: Creating new languages and changing the source language requires a specific workflow and additional configuration.
Automating the execution of prompts
By default, executing a prompt to generate an output is done by either manually selecting the Rewrite in Language button, or by executing a relevant bulk update. In either case, a business rule is executed and an event is generated 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 products into a workflow specific to the language: AI Review Workflow - Text to Translation NL, AI Review Workflow - Text to Translation DE, or AI Review Workflow - Text to Translation FR. If desired this can be changed to another existing workflow or workflow state. To accomplish this, the user must edit the business rule GenAI - Translations - Translate Attribute - Translate Attribute via Generative AI and change the hard-coded prefix of the workflow ID wf_AIReviewWF_TextToTranslation via the variable "aiTranslationWorkflow". Next, edit the business rule to ensure the translation corresponds with the correct workflow by searching for the variable "aiTranslationWorkflowContext" and making any required changes.