Using a machine learning model to predict a user's quantity ceiling for different categories of items in a catalog
An online system trains a ceiling prediction model to determine a user's ceiling for one or more item categories. The user's ceiling for an item category is a maximum amount of an item within the item category the user is likely to include in an order. Based on previously fulfilled orders for the user, information describing a current order from the user, and contextual information about the order, the ceiling prediction model determines the user's ceiling for an item category. The online system leverages the user's ceiling for an item category to refine content about different items that is selected for presentation to a user. For example, the online system determines whether the order includes a quantity of items from an item category that equals the user's ceiling for the item category when determining which items to present to the user.
1 . A method, performed at an online computer system comprising a processor and a computer-readable medium, comprising:
receiving, at the online computer system, an order from a user, the order including one or more items, each item having a corresponding item category;
retrieving one or more previously fulfilled orders for the user that the online computer system previously fulfilled;
identifying a ceiling of the user for an item category by applying a ceiling prediction model to information describing the order, the information describing the order including quantities of items included in the order and to the one or more previously fulfilled orders, the ceiling of the user for the item category comprising a maximum quantity of items from the item category likely to be included in the order, wherein the ceiling prediction model comprises a machine-learning model trained by:
obtaining a training dataset including a plurality of training examples, each training example including, a training item category, a training history of previously fulfilled orders, information describing a training order, and contextual information about the training order, each training example having a label indicating a ceiling for the training item category;
applying the ceiling prediction model to each training example of the training dataset to generate a predicted ceiling for the training item category;
scoring the ceiling prediction model using a loss function and the label of the training example; and
updating one or more parameters of the ceiling prediction model by backpropagation based on the scoring until one or more criteria are satisfied;
dynamically adjusting the identified ceiling of the user for the item category based on changes in ordering patterns by the user;
selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category, wherein selecting content based on the adjusted ceiling of the user for the item category further comprises:
generating a set of content items for display in a user interface; and
based on a comparison of the identified adjusted ceiling of the user for the item category and a quantity of items in the item category included in the set of content items for display, removing one or more of the items in the item category from the generated set of content items for display; and
sending the selected content to a device of the user, the sending causing the device of the user to display the selected content.
2 . The method of claim 1 , wherein selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category comprises: filtering content items associated with items by removing content items associated with items from the item category in response to the online computer system determining the order includes a quantity of items associated with the item category equaling the adjusted ceiling of the user for the item category; and selecting one or more of the filtered content items for presentation to the user.
3 . The method of claim 1 , wherein selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category comprises: ranking content items associated with items for the user based on one or more criteria; modifying the ranking by decreasing a position in the ranking of a content item associated with an item from the item category in response to the online computer system determining the order includes a quantity of items associated with the item category equaling the adjusted ceiling of the user for the item category; and selecting one or more of the ranked content items for presentation to the user based on the modified ranking.
4 . The method of claim 1 , wherein selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category comprises: ranking content items associated with items for the user based on one or more criteria; modifying the ranking by increasing a position in the ranking of a content item associated with an item from the item category in response to the online computer system determining the order includes a quantity of items associated with the item category less than the adjusted ceiling of the user for the item category; and selecting one or more of the ranked content items for presentation to the user based on the modified ranking.
5 . The method of claim 1 , wherein selecting content for presentation by the online computer system to the user based on the ceiling of the user for the item category comprises: retrieving a desired ceiling for the item category stored in association with the user by the online computer system; generating a prompt for the user in response to the online computer system determining the adjusted ceiling of the user for the item category exceeds the desired ceiling for the item category; and sending the prompt to a graphical user interface of the device of the user, causing the device of the user to display the prompt.
6 . The method of claim 5 , wherein generating the prompt comprises including, in the generated prompt, a suggestion for the user to remove an item included in the item category from the order.
7 . The method of claim 1 , wherein identifying the ceiling of the user for the item category by applying the ceiling prediction model to information describing the order and to the one or more previously fulfilled orders comprises:
applying the ceiling prediction model to information describing the order, to contextual information about the order, and to the one or more previously fulfilled orders.
8 . The method of claim 7 , wherein applying the ceiling prediction model to contextual information describing the order comprises applying the ceiling prediction model to one or more of: a time of year when the order was received, a time of day when the order was received, an indication whether the order was received within a threshold amount of time of a holiday, an indication whether the order was received within a threshold amount of time of an occasion the online computer system stored in association with the user, a type of picker client device used by a picker fulfilling the order, or any combination thereof.
9 . The method of claim 8 , wherein a type of picker client device used by a picker fulfilling the order indicates whether the picker client device is a smart shopping cart.
10 . A computer program product comprising a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by a processor, cause the processor to perform steps comprising:
receiving, at an online computer system, an order from a user, the order including one or more items, each item having a corresponding item category;
retrieving one or more previously fulfilled orders for the user that the online computer system previously fulfilled;
identifying a ceiling of the user for an item category by applying a ceiling prediction model to information describing the order, the information describing the order including quantities of items included in the order and to the one or more previously fulfilled orders, the ceiling of the user for the item category comprising a maximum quantity of items from the item category likely to be included in the order, wherein the ceiling prediction model comprises a machine-learning model trained by:
obtaining a training dataset including a plurality of training examples, each training example including, a training item category, a training history of previously fulfilled orders, information describing a training order, and contextual information about the training order, each training example having a label indicating a ceiling for the training item category;
applying the ceiling prediction model to each training example of the training dataset to generate a predicted ceiling for the training item category;
scoring the ceiling prediction model using a loss function and the label of the training example; and
updating one or more parameters of the ceiling prediction model by backpropagation based on the scoring until one or more criteria are satisfied;
dynamically adjusting the identified ceiling of the user for the item category based on changes in ordering patterns by the user;
selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category, wherein selecting content based on the adjusted ceiling of the user for the item category further comprises:
generating a set of content items for display in a user interface; and
based on a comparison of the identified adjusted ceiling of the user for the item category and a quantity of items in the item category included in the set of content items for display, removing one or more of the items in the item category from the generated set of content items for display; and
sending the selected content to a device of the user, the sending causing the device of the user to display the selected content.
11 . The computer program product of claim 10 , wherein selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category comprises: filtering content items associated with items by removing content items associated with items from the item category in response to the online computer system determining the order includes a quantity of items associated with the item category equaling the adjusted ceiling of the user for the item category; and selecting one or more of the filtered content items for presentation to the user.
12 . The computer program product of claim 10 , wherein selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category comprises: ranking content items associated with items for the user based on one or more criteria; modifying the ranking by decreasing a position in the ranking of a content item associated with an item from the item category in response to the computer system determining the order includes a quantity of items associated with the item category equaling the adjusted ceiling of the user for the item category; and selecting one or more of the ranked content items for presentation to the user based on the modified ranking.
13 . The computer program product of claim 10 , wherein selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category comprises: ranking content items associated with items for the user based on one or more criteria; modifying the ranking by increasing a position in the ranking of a content item associated with an item from the item category in response to the online computer system determining the order includes a quantity of items associated with the item category less than the adjusted ceiling of the user for the item category; and selecting one or more of the ranked content items for presentation to the user based on the modified ranking.
14 . The computer program product of claim 10 , wherein selecting content for presentation by the online computer system to the user based on the ceiling of the user for the item category comprises: retrieving a desired ceiling for the item category stored in association with the user by the online computer system; generating a prompt for the user in response to the online computer system determining the adjusted ceiling of the user for the item category exceeds the desired ceiling for the item category; and sending the prompt to a graphical user interface of the device of the user, causing the device of the user to display the prompt.
15 . The computer program product of claim 14 , wherein generating the prompt comprises including, in the generated prompt, a suggestion for the user to remove an item included in the item category from the order.
16 . The computer program product of claim 10 , wherein identifying the ceiling of the user for the item category by applying the ceiling prediction model to information describing the order and to the one or more previously fulfilled orders comprises:
applying the ceiling prediction model to information describing the order, to contextual information about the order, and to the one or more previously fulfilled orders.
17 . The computer program product of claim 16 , wherein applying the ceiling prediction model to contextual information describing the order comprises applying the ceiling prediction model to one or more of: a time of year when the order was received, a time of day when the order was received, an indication whether the order was received within a threshold amount of time of a holiday, an indication whether the order was received within a threshold amount of time of an occasion the online computer system stored in association with the user, a type of picker client device used by a picker fulfilling the order, or any combination thereof.
18 . The computer program product of claim 17 , wherein a type of picker client device used by a picker fulfilling the order indicates whether the picker client device is a smart shopping cart.
19 . A system comprising: a processor; and a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by the processor, cause the processor to perform steps comprising:
receiving, at an online computer system, an order from a user, the order including one or more items, each item having a corresponding item category;
retrieving one or more previously fulfilled orders for the user that the online computer system previously fulfilled;
identifying a ceiling of the user for an item category by applying a ceiling prediction model to information describing the order, the information describing the order including quantities of items included in the order and to the one or more previously fulfilled orders, the ceiling of the user for the item category comprising a maximum quantity of items from the item category likely to be included in the order, wherein the ceiling prediction model comprises a machine-learning model trained by:
obtaining a training dataset including a plurality of training examples, each training example including, a training item category, a training history of previously fulfilled orders, information describing a training order, and contextual information about the training order, each training having a label indicating a ceiling for the training item category;
applying the ceiling prediction model to each training example of the training dataset to generate a predicted ceiling for the training item category;
scoring the ceiling prediction model using a loss function and the label of the training example; and
updating one or more parameters of the ceiling prediction model by backpropagation based on the scoring until one or more criteria are satisfied;
dynamically adjusting the identified ceiling of the user for the item category based on changes in ordering patterns by the user;
selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category, wherein selecting content based on the adjusted ceiling of the user for the item category further comprises:
generating a set of content items for display in a user interface; and
based on a comparison of the identified adjusted ceiling of the user for the item category and a quantity of items in the item category included in the set of content items for display, removing one or more of the items in the item category from the generated set of content items for display; and
sending the selected content to a device of the user, the sending causing the device of the user to display the selected content.
20 . The system of claim 19 , wherein selecting content for presentation by the online computer system to the user based on the adjusted ceiling of the user for the item category comprises:
filtering content items associated with items by removing content items associated with items from the item category in response to the online computer system determining the order includes a quantity of items associated with the item category equaling the adjusted ceiling of the user for the item category; and
selecting one or more of the filtered content items for presentation to the user.