Apply Generative AI In a Data Flow in Oracle Analytics

Use the data flow editor to apply generative AI to your data in Oracle Analytics. For example, you might summarize customer comments.

  1. On your home page, click Create, and then click Data Flow.
  2. Select a dataset and click Add.
  3. In the Data Flow editor, click Add a step (+).
  4. To generate text, from the Data Flow Steps pane, select Add Column or Transform Column, and then select AI Generate from the function picker.

    For example:
    AI_GENERATE(  'Review: ' || REVIEW_TEXT || ';
    Rating: ' || CAST(RATING
    AS VARCHAR(5)),  'Given the review and rating,
    classify the review as positive, negative, or neutral. Return only one word in lowercase
    between the options: positive, negative, or neutral.',  'model'.'id'  ) FROM 
    REVIEWS;
  5. To apply a semantic filter, from the Data Flow Steps pane, select Filter, then from the Filter Bar Menu select Create Expression Filter, and then select AI Filter from the function picker.

    For example:
    AI_FILTER(  'Is the review negative?',  'Review: ' || REVIEW_TEXT,  'model'.'id' )

    Note:

    If the dropdown for the model argument doesn't show the model you want to use, check that your model is registered in the Shared Folders area in the catalog, and that the model owner has granted you Read-Only or higher permissions. See Make a Generative AI Model Available in Oracle Analytics.
  6. Add a Save Data step, and save the data flow.
You can now run the data flow to apply the generative AI model and add the results to the output dataset.
After you finish authoring content, either you (if you have Full Control of the model) or the Generative AI model owner must grant intended 'readers' at least Read-Only permission to access the content.