Generative AI

Digital teams are constantly creating and iterating on experiences for their audiences. With the Uniform AI hub they can leverage generative AI from within compositions or content entries to ease the creation of optimized experiences.

Content or technical architects, or other team members responsible for modeling components and content types will:

Generative AI in Uniform starts with integrations. Three services are available in the AI section of the integrations page of the application:

  • OctoAI Stable Diffusion: Bring Stable Diffusion models into generating images for your entries and compositions.
  • OpenAI: Generate textual content for entries and compositions.
  • Writer: An alternate source for generating text.

Adding an AI integration is the same as adding any other integration to your Uniform project.

  1. Navigate to Integrations in the Uniform app, and select the AI category.

  2. Choose one or more of the available integrations, and click Add to project.

    add-ai-integration
    The available AI integrations.

When you select the OctoAI integration, you will need to provide the API endpoint and API key from your OctoAI account to complete the connection.

add-octoai-integration
Enter your credentials to complete the integration.

When you select the OpenAI integration, you will need to provide your organization, and API key from your account to complete the connection.

add-openai-integration
Enter your credentials to complete the integration.

When you select the Writer integration, you will need to provide your organization, team, and API key from your account to complete the connection.

add-writerai-integration
Enter your credentials to complete the integration.

Once an AI integration has been added to your project, you can manage prompts under Settings > prompts.

Prompts contain the instructions you give a large language model to generate an intended output. Team administrators, or whoever is responsible for setting up components and content types for composition authors can set up the prompts for authors to use when generating content. This requires the Manage Component Library permission. These prompts will be available to authors of entries or compositions.

To create a prompt:

  • Navigate to Settings > Prompts within your project.
  • Click the Add prompt button.
  • Select which AI service you want to create a prompt for and click Add.
  • Enter the following values for the prompt:
    FieldDescription
    Prompt nameEnter the name by which you want to identify the prompt on the management page.
    EnabledOnce a prompt is enabled it's available in Canvas for use in creating compositions and entities.
    Current valueThe current value input box mimics the parameter or field value and fills in the current value variable. Only shown if the prompt text contains Current value variable. Once a prompt and (if applicable) variables are entered and a response is generated, the output is entered in this field.
    Generate (button)This button activates the process of generating a response to the prompt.
    Prompt textInstructions sent to the generative AI. These instructions can include variables.

Clicking add variable opens a drawer in which you can configure a variable to include as part of the prompt. These variables could be product names or any other indicators that could be of use to your composition authors. Multiple variables can be made available for addition into the prompt. The system will expect a value for every variable in the prompt to be added before generating a response.

There are two variables provided by Uniform and available to insertion into prompts:

  • Current Value: This is populated from the current parameter value.
  • Current Locale: This is populated from the currently active locale. Only available if your project has more any configured locales
  • Audience: Any audience configured within your project will be available for insertion into a prompt.

When you create a prompt you can configure it to appear on either text or asset parameters or fields. These should be used as expected; Text parameters and fields expect text. Asset parameters and fields expect binary files.

On the prompt management page, you can access additional management options through opening the menu under •••. From this menu you can:

  • Duplicate the prompt for easy creation of new prompts.
  • Disable the prompt to prevent it from being accessed from within compositions and entries.
  • Delete the prompt.
manage-prompts
The options available for managing prompts.

OctoAI, Writer, and OpenAI each come with preconfigured prompts ready for use in compositions or entries.

The OctoAI integration comes with Generate image using Unstable Diffusion. This is a basic image prompt where you can enter a description of the image you would like generated.

Writer comes with Write copy based on external content. This prompt states:

As an experienced marketer, generate compelling copy from this URL: URL and keep it under 300 characters in length.

The OpenAI integration comes with several pre-configured prompts:

  • Ask ChatGPT: This uses the variable prompt in conjunction with the instruction:

    Prompt Do not repeat my question and do not include phrases like 'Sure, here's your answer:'.

    In this instance the text entered by the composition author would be combined with the instruction above to generate a response.

  • Make longer: This prompt takes the text entered by the composition author and lengthens it. Length is up to the AI.

    Make this text longer: Current value

  • Make shorter: This prompt takes the text entered by the composition author and shortens it. Length is up to the AI.

    Make this text shorter: Current value

  • Personalize for a given audience:

    Personalize my text for audience. Here's my text: Current value

  • Generate image from topic: This prompt takes text and generates an image based on the text in topic.

    Generate an image based on the topic below. Here's the topic: topic

  • Generate image from topic (color): This prompt takes text and color to generate an image based on the text in topic and color inputs.

    Generate an image based on the topic below. The primary color in the image should be color. Here's the topic: topic

attention

Pre-configured prompts can't be edited so that Uniform can actively manage and update prompts based on customer feedback. You can replace pre-configured prompts with custom ones by duplicating and disabling the original ones.

Now that you have installed the integration and configured your prompts, teams can start generating content in their compositions and entries.

All text and asset parameters and fields will have a new AI icon in authoring views.

ai-icon-on-text-field
The AI icon that has been added to a text field.

Clicking the AI icon on a text field will open a drawer in which any text already entered is shown, along with any available prompts.

open-ai-to-generate-text
Available prompts for generating text.

Once you select a prompt you will be able to:

  • See the current contents of the parameter or field (if any)
  • Enter prompt variables (if applicable)
  • Generate a result

From the generated result you can:

  • Edit variables (if applicable) and regenerate
  • Regenerate to get a new response to the prompt.
  • Edit what was returned.
  • Accept what was generated. The text will then be entered into the field or parameter.
  • Cancel the action.
work-with-prompt
An example of working with a prompt from a parameter or field.

Clicking the AI icon on an asset parameter or field will open a drawer in which any image already entered is shown, along with any available prompts.

open-ai-to-generate-image
Available prompts for generating images.

Once you select a prompt you will be able to:

  • See the current contents of the parameter or field (if any)
  • Enter prompt variables (if applicable)
  • Generate a result

From the generated result you can:

  • Edit variables (if applicable) and regenerate
  • Regenerate to get a new response to the prompt.
  • Select an image.
  • Accept what was generated. The image will then be entered into the field or parameter.
  • Cancel the action.
work-with-prompt-image
An example of working with a prompt from a parameter or field.