

# Updating data in datasets after training


 As your catalog grows, import additional training data into your datasets. This helps maintain and improve the relevance of Amazon Personalize recommendations. You can import more data with bulk or individual data import operations. 
+ With individual imports, Amazon Personalize appends the new records to the dataset. To update an individual item, user, or action, you can import a record with the same ID but with the modified attributes. You can import up to 10 records per individual import operation. 

  For more information on importing records individually, see [Importing individual records into an Amazon Personalize dataset](incremental-data-updates.md). For information about recording real-time events, see [Recording real-time events to influence recommendations](recording-events.md). 
+ With bulk imports, you add to or replace bulk data by [creating another import job](bulk-data-import-step.md). By default, a dataset import job replaces any existing data in the dataset that you imported in bulk. You can instead append the new records to existing data by changing the job's [import mode](bulk-data-import-step.md#bulk-import-modes).

  To append data to an Item interactions dataset or Action interactions dataset with a dataset import job, you must have at minimum 1000 new item interaction or action interaction records. Within 20 minutes of completing a bulk import, Amazon Personalize updates any filters you created in the dataset group with your new bulk data. This update allows Amazon Personalize to use the most recent data when filtering recommendations for your users. 

 After you create an Items or Users dataset, you can replace its schema with a new or existing one. You might replace a dataset's schema if your data structure changed after you created the dataset. For example, you might have a new column of item metadata that you want Amazon Personalize to consider during training. Or you might want to add a column of data to use only when filtering recommendations. For more information, see [Replacing a dataset's schema to add new columns](updating-dataset-schema.md).

After you create a recommender or custom solution version, how new data influences recommendations depends on its type, the method of import, and the domain use case or custom recipe you use. The following sections explain how new data influences real-time and batch recommendations before the next training. 

**Topics**
+ [

# How new data influences real-time recommendations
](how-new-data-influences-recommendations.md)
+ [

# How new data influences batch recommendations (custom resources)
](how-new-data-influences-batch-recommendations.md)

# How new data influences real-time recommendations


After you create a recommender or custom solution version, how new data influences real-time recommendations depends on the data's type, the method of import, and the domain use case or custom recipe you use. The following sections explain how new data influences real-time recommendations before the next training. 

Training can be a recommender's weekly automatic training, or automatic or manual solution version creation. For manual training with User-Personalization, omit the `trainingMode` to use the default `FULL` training mode. 

**Topics**
+ [

## New interactions
](#new-interactions)
+ [

## New items
](#new-items)
+ [

## New users
](#new-users)
+ [

## New actions
](#new-actions)

## New interactions


New interactions are item or action interactions that you import after the latest training. For both real-time and bulk data, if interactions involve a new item or action, Amazon Personalize might consider it for recommendations without training if your recipe or use case features exploration. For more information, see [New items](#new-items) or [New actions](#new-actions).

**Real-time events**

 For use cases and recipes that feature real-time personalization, Amazon Personalize immediately uses real-time interactions between a user and items or actions present at the latest training. When generating recommendations for the user in the vent, Amazon Personalize uses these real-time interactions. For more information about real-time personalization, see [Real-time personalization](use-case-recipe-features.md#about-real-time-personalization). 

 For any domain use cases and custom recipes that don't feature real-time personalization, such as recommending similar items, your model learns from real-time interactions data only after training. 

**Bulk interactions**

For *bulk interactions*, for both incremental *and* full dataset import jobs, your model learns from bulk item interaction or action interaction data only after the next training. Bulk data isn't used to update recommendations for real-time personalization. 

For more information about importing more bulk data, see [Importing bulk data into Amazon Personalize with a dataset import job](bulk-data-import-step.md).

## New items


New items are items that you import after the latest training. They can come from either interactions data or item metadata in an Items dataset. 

New items are considered for recommendations as follows:
+ For *Top picks for you* and *Recommended for you* domain cases or User-Personalization-v2, User-Personalization, or Next-Best-Action recipes, Amazon Personalize automatically updates the model every two hours. After each update, Amazon Personalize considers new items for recommendations as part of exploration. When considering the new item, Amazon Personalize considers any metadata for the item. However this data will have a greater effect on recommendations only after you record interactions for the item and train a new model. For information about updates, see [Automatic updates](use-case-recipe-features.md#automatic-updates). 
+ If you use the *Trending now* use case, Amazon Personalize automatically evaluates your interactions data every two hours and identifies trending items. You don't have to wait for your recommender to train. If you use the *Trending-Now recipe*, Amazon Personalize automatically considers all new items over configurable intervals without training. For information about configuring intervals, see [Trending-Now recipe](native-recipe-trending-now.md).
+ If you don't use the Trending-Now recipe or your use case or recipe doesn't support automatic updates, Amazon Personalize will consider new items only after the next training.

## New users


 New users are users that you import after the latest training. They can come from either interactions data or user metadata in a Users dataset. For new, anonymous users (users without a userId), you can record events for the user with a `sessionId` and Amazon Personalize will associate events with the user before they log in. For more information, see [Recording events for anonymous users](recording-events.md#recording-anonymous-user-events). 

Amazon Personalize generates recommendations for new users as follows:
+  If you use the Trending now domain use case or Trending-Now custom recipe, new users immediately receive recommendations for the top trending items. If you use the Popularity-Count recipe, new users immediately receive recommendations for items with the most interactions.
+  For recipes or use cases that provide personalized recommendations for users, recommendations for new users are based on the early interaction histories of your existing users. The first items or actions these existing users interacted with are more likely to be recommended to new users. For the User-Personalization or Personalized-Ranking recipes, if you set `recency_mask` to `true`, recommendations also include items based on the latest popularity trends in your interactions data. 

The following can increase recommendation relevance for new users:
+  Interactions data – The primary way to improve recommendation relevance for a new user is to import data from their interactions with your items. For information about how new interactions data influences recommendations, see [New interactions](#new-interactions). 
+ User metadata – Importing user metadata, such as GENDER or MEMBERSHIP\$1STATUS, can improve recommendations. For metadata to influence recommendations, you must wait for your domain recommender's weekly automatic retraining to complete. Or you must manually create a new solution version. 
+ Contextual metadata – If your use case or recipe supports contextual metadata and your Item interactions dataset has metadata fields for contextual data, you can provide the user's context in your request for recommendations. This does not require retraining. For more information, see [Increasing recommendation relevance with contextual metadata](contextual-metadata.md). 

## New actions


New actions are actions that you import since the latest training. They can come from either action interaction data or actions in an Actions dataset. 

With the Next-Best-Action recipe, Amazon Personalize automatically updates a solution version every two hours. After each update, Amazon Personalize considers new actions for recommendations as part of exploration. When considering the new action, Amazon Personalize considers any metadata for the action. However, this data will have a greater effect on recommendations only after you record action interactions for the action and fully retrain. For information about updates, see [Automatic updates](use-case-recipe-features.md#automatic-updates) 

# How new data influences batch recommendations (custom resources)


After you create a custom solution version, how new data influences batch recommendations depends the data's type, the method of import, and the custom recipe you use. 

For user segments, Amazon Personalize generates segments using only the data present at the last full solution version training. And Amazon Personalize uses only bulk data that you imported with an import mode of FULL (replacing existing data). For more information about user segments, see [Getting batch user segments with custom resources](getting-user-segments.md).

When generating batch item recommendations, Amazon Personalize considers all bulk data present at the time of latest solution version creation. This data can be imported with an import mode of FULL or INCREMENTAL. For newer bulk records to influence batch recommendations, you must create a new solution version and then create the batch inference job. 

The following sections explain how individual imports influence batch item recommendations.

**Topics**
+ [

## New interactions
](#batch-new-interactions)
+ [

## New users
](#batch-new-users)
+ [

## New items
](#batch-new-items)

## New interactions


If you use a USER\$1PERSONALIZATION or PERSONALIZED\$1RANKING recipe, Amazon Personalize considers new item interactions data with existing items and users within about 15 minutes from data import. These items and users must have been present at the latest training. To make sure events are considered, we recommend you wait at minimum 15 minutes before you start a batch inference job. For all other recipes, and for events with new items or users, you must create a new solution version for the streamed events to influence batch recommendations.

## New users


 For users without interactions data, recommendations are initially for only popular items. If you use a USER\$1PERSONALIZATION or PERSONALIZED\$1RANKING recipe and you record events for the user, their recommendations might become more relevant within about 15 minutes after import without retraining. To make sure events are considered, we recommend you wait at minimum 15 minutes before you start a batch inference job. For all other recipes, you must create a new solution version for streamed events to influence batch recommendations for users without interactions data. 

## New items


With User-Personalization-v2 and User-Personalization, when you create a batch inference job and specify the latest fully trained solution version for your solution, Amazon Personalize automatically updates the solution version to include new items in recommendations with exploration. If you don't specify the latest solution version, no update occurs. For any other recipe, you must create a new solution version for new items to be featured in batch recommendations. For more information about exploration, see [Exploration](use-case-recipe-features.md#about-exploration).