Create recommendation models

This page describes how to create a new Media Recommendations model.

If you already have a recommendation model of the correct type and you want to get recommendations from it from a different location in your site, you can create a new serving config for it rather than creating a new model.

Introduction

When you want to use a new recommendation type for getting recommendations, you must create a new recommendation model and provide sufficient user event data for it to be trained. You create serving configs for your new model and, when the model has finished training, request recommendations from those serving configs.

Create a recommendation model

Add a new recommendation model by using the Google Cloud console. You can have up to 20 models per project, and up to 10 of them can be active (not paused) at any time. Learn more about pausing a model.

You can start up to 5 model operations per minute. Limited model operations include creation, deletion, pause, and resume.

Before you create a new model:

To create a new model:

  1. Go to the Discovery Engine Models page in the Google Cloud console.

    Go to the Models page

  2. Click Create model.

  3. Enter a name for your model.

    The name must be 1024 characters or less, and can contain only alphanumeric characters, underscores, hyphens, and spaces.

  4. Choose the recommendation type.

  5. Choose the business objective, if available for the model type you selected.

  6. Review the Data requirements met? list to confirm that you have uploaded sufficient data for the model type you selected.

    If an unmet data requirement prevents you from creating the model, an X icon appears next to the requirement and the Create button at the bottom of the Create recommendation model pane is disabled.

    If you need to upload more data, carefully review the data requirements listed to make sure whether some or all of them need to be fulfilled for that model, then import the user events or products required to create the model

    For how to import, see Import historical user events and Import documents.

  7. Choose how often to tune the model. For tuning cost details, see Pricing.

    • Every three months: The model automatically tunes every three months.
    • Manual tune only: The model is tuned only when you tune it manually.
  8. Click Create to create the new recommendation model.

    If you have uploaded sufficient user event data of the required type, the initial model training and tuning begins. Initial model training and tuning takes 2-5 days to complete, but can take longer for large datasets.

Requirements for creating a new recommendation model

The first time you use a specific recommendation type for your site, you are training a new machine learning model, which requires sufficient training data, as well as time to train and tune the model. The following steps are required to start using a new recommendation type:

  1. Import your documents to Discovery for Media, if you haven't already, and implement processes to keep the uploaded datastore up to date.
  2. Start recording user events to Discovery for Media, if you haven't already, making sure to follow the best practices for recording user event data.
  3. Identify the recommendation type and optimization objective you want to use.
  4. Determine the user event data requirement for your desired recommendation type and objective.
  5. Import historical user event data to meet the minimum event data requirements, or wait until the user event data collection meets the minimum requirements.
  6. Create your model and your serving configs.

    At this point, Discovery for Media initiates model training and tuning. Initial model training and tuning takes 2-5 days to complete, but can take longer for large datasets.

User event data requirements

The type of user events you import, and the amount of data you need, depends on your recommendation (model) type and your optimization objective. When you reach the minimum data requirement, you can begin model training.

The data collection window represents the maximum length of time that Discovery for Media looks back for user events; importing more historical data has no effect on model quality.

Because Discovery for Media cannot produce good quality models based on synthetic data, make sure to use real user events and real document data.

Model type Objective /
Context event type
Supported user event types Minimum data requirement Data collection window
Recommended for You Click-through rate
/
Home page context
view-item

view-home-page

{  [  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND

At least 100 unique documents for view-item event in the last 90 days

AND

At least 10,000 view-item events in the last 90 days  ]

OR

[  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND

At least 100 unique documents for media-play event in the last 90 days

AND

At least 10,000 media-play events in the last 90 days  ]  }

AND

{  [  (At least 7 event days and at least 10 average occurrences per document) OR (at least 7 event days) for view-home-page event in the last 90 days

AND

At least 10,000 view-home-page events in the last 90 days ]  }

3 months
Recommended for You Click-through rate
/
Generic
view-item

view-home-page

[  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND


At least 100 unique documents for view-item event in the last 90 days

AND


At least 10,000 view-item events in the last 90 days
  ]

OR

[  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND


At least 100 unique documents for media-play event in the last 90 days

AND


At least 10,000 media-play events in the last 90 days  ]

3 months
Recommended for You Conversion rate
/
Home page context
media-play

media-complete

view-home-page

view-item (recommended but not required)

{  [  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND

At least 100 unique documents for view-item event in the last 90 days

AND

At least 10,000 view-item events in the last 90 days  ]

OR

[  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND

At least 100 unique documents for media-play event in the last 90 days

AND

At least 10,000 media-play events in the last 90 days  ]  }

AND

{  [  (At least 7 event days and at least 10 average occurrences per document) OR (at least 7 event days) for view-home-page event in the last 90 days

AND

At least 10,000 view-home-page events in the last 90 days  ]  }

AND

{  [  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-complete event in the last 90 days

AND

At least 100 unique documents for media-complete event in the last 90 days

AND

At least 10,000 media-complete events in the last 90 days  ]  }

3 months
Recommended for You Conversion rate
/
Generic
media-play

media-complete

view-home-page

view-item (recommended but not required)

{  [  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND

At least 100 unique documents for view-item event in the last 90 days

AND

At least 10,000 view-item events in the last 90 days  ]

OR

[  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND

At least 100 unique documents for media-play event in the last 90 days

AND

At least 10,000 media-play events in the last 90 days  ]  }

AND

{  At least 7 event days and at least 10 average occurrences per document OR at least 60 event days for media-complete event in the last 90 days

AND

At least 100 unique documents for media-complete event in the last 90 days

AND

At least 10,000 media-complete events in the last 90 days  }

3 months
Others You May Like Click-through rate view-item

media-play

[   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND

At least 100 unique documents for view-item event in the last 90 days

AND

At least 10,000 view-item events in the last 90 days  ]

OR

[   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND

At least 100 unique documents for media-play event in the last 90 days

AND

At least 10,000 media-play events in the last 90 days  ]

3 months
Others You May Like Conversion rate media-play

media-complete

view-item (recommended but not required)

{  [   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND

At least 100 unique documents for view-item event in the last 90 days

AND

At least 10,000 view-item events in the last 90 days  ]

OR

[   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND

At least 100 unique documents for media-play event in the last 90 days

AND

At least 10,000 media-play events in the last 90 days  ]  }

AND

{  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-complete event in the last 90 days

AND

At least 100 unique documents for media-complete event in the last 90 days

AND

At least 10,000 media-complete events in the last 90 days  }

3 months
More Like This Click-through rate view-item

media-play

[   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND

At least 100 unique documents for view-item event in the last 90 days

AND

At least 10,000 view-item events in the last 90 days  ]

OR

[   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND

At least 100 unique documents for media-play event in the last 90 days

AND

At least 10,000 media-play events in the last 90 days  ]

3 months
More Like This Conversion rate view-item

media-play

media-complete

{  [   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for view-item event in the last 90 days

AND

At least 100 unique documents for view-item event in the last 90 days

AND

At least 10,000 view-item events in the last 90 days  ]

OR

[   (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-play event in the last 90 days

AND

At least 100 unique documents for media-play event in the last 90 days

AND

At least 10,000 media-play events in the last 90 days  ]  }

AND

{  (At least 7 event days and at least 10 average occurrences per document) OR (at least 60 event days) for media-complete event in the last 90 days

AND

At least 100 unique documents for media-complete event in the last 90 days

AND

At least 10,000 media-complete events in the last 90 days  }

3 months
Most Popular Click-through rate view-item

media-play

[  10,000 media-play events that include at least 100 unique user pseudo IDs and 100 unique joined documents.

AND

( 1 week, with an average of 10 media-play events per joined document.

OR

60 days that each have at least one joined media-play event )  ]

OR

[  10,000 view-item events that include at least 100 unique user pseudo IDs and 100 unique joined documents.

AND

( 1 week, with an average of 10 view-item events per joined document.

OR

60 days that each have at least one joined view-item event )  ]

The default is 60 days.
Most Popular Conversion rate media-complete

10,000 media-complete events that include at least 100 unique user pseudo IDs and 100 unique joined documents.

AND

( 1 week, with an average of 10 media-complete events per joined document.

OR

60 days that each have at least one joined media-complete event )

The default is 60 days.

What's next