AI Model Tutorial 1 - Address Change Intent Detection

This tutorial is a guide to walk you through an example building an AI model.

The Problem to Solve

You want to build an AI model to test if emails you receive are requesting a change of address.

Required Materials

To follow along with this tutorial, you will need:

A Dropbox account from

Download: Address Change Dataset

Guide Outline

The steps to complete for this guide are as follows:

  1. Create a Connection in Hero_Flow to Dropbox

  2. Create an Input in Hero_Flow to define in input data

  3. Build an AI Model in AI Studio

  4. Train an AI Model

  5. View the Results 

Basics for Creating a Model in AI Studio

The basics for building an AI model are completing the following steps:

  1. Create a Connection to where you data is located.
  2. Create an Input to bring your data to Hero_Flow.
  3. Build an AI model using your data in Hero_Flow's AI Studio. 
  4. Train your AI model.
  5. View the results of the trained AI model.

Set Up the Data

This section links to steps explained in a previous tutorial. 

  1. Log in or create a Dropbox account.
  2. Create a Connection and upload the CSV file to Dropbox
    1. The file to upload into Dropbox is titled: address-change-dataset-mid.csv

Create a Input for the Data

  1. From the Hero_Flow dashboard, click Inputs.


  3. When creating a new Input:

    1. Enter a name for the Input. (Example: Address Change Data)

    2. Select the Dropbox Connection.

    3. Enter the file path to the data. (Example: /address-change-dataset-mid.csv)

    4. Click the refresh icon next to the Fields mapping table.

      The Fields mapping table displays all the data column names and column types from your source data.

      With this feature you can review, add, and remove columns to read and analyze in Hero_Flow.

  4. Click Yes to load the table fields.

  5. All the fields are found from the demo data file.

    1. Change the data type form the Label field from LONG to DOUBLE.

    2. Click OK to finish saving the Input.

Build an AI Model in AI Studio

The first step is setting up your model.

  1. From the Hero_Flow dashboard, click on Models.

  2. At the top of the Models dashboard, click Create a New AI Model.

    1. Enter a name for the AI model.
    2. Select the data set name for the Input you had just created. (Example: Address Change Data)
  3. Configure the fields.
    1. Select the Input radio button for the "sentence" field.
    2. Select the Output radio button for the "label" field.
  4. Click Create.

You are now in the AI Studio where the training model can be configured.

  1. Directly after the input box (titled "sentence"), click the plus icon (+) to add a preprocessor.
    1. Select Text Embedder and click OK.
  2. Next, between the two Dense layers, click the plus icon (+) to add a new layer.
    1. Select Dense and click OK.
    2. Under Layer Configuration, change the Unit value to 20.
    3. Click OK to save the layer.

Configure an AI Model

  1. From the toolbar at the to of AI Studio, click Configure.
  2. Click the Basic tab.
    1. The training DataSet should list the Address Change Data.
    2. Set the Split Data value so Trainings Data is at 80%.
  3. Click the Advanced tab.
    1. Set the Epochs value to 5.
    2. Select ADAM for the Optimizer. 
    3. Select Mean Squared Error from the Loss drop-down box.
    4. Select ACCURACY for the Metrics.
  4. Click OK to save the configuration settings.

Train an AI Model

Now that the AI Model has been built, it can be trained and later help with accurate predictions.

  1. From the toolbar at the top of AI Studio, click Save.
    1. Click Save to current revision.
  2. From the toolbar, click Train.
    1. Click OK to begin training the AI model. 

This tutorial training process may take a long period of time depending on the power of the compute node you are using.

View the Results

After the training has completed, the results can be found by clicking Training Dashboards from the toolbar.

The result of this tutorial shows the trained model is over 90% accurate with a low amount of loss. This means that when applying this AI model within a Flow, the model is confident can detect emails requesting a change of address.