Automated widget placement using machine learning-based contextual estimation
Methods, systems, and apparatuses include receiving query data. Contextual data is generated based on the received query data. Feature vectors are generated for a new widget based on the query data and contextual data. A widget ranking model is configured using the feature vectors. The configured widget ranking model is applied to a plurality of widgets. The new widget is assigned to a widget slot using an output of the configured widget ranking model. Reward data is received from a graphical user interface in response to presentation of the new widget in the assigned widget slot. The configured widget ranking model is updated based on the reward data.
1 . A method comprising:
based on received query data, generating contextual data for a plurality of widgets and a plurality of widget slots, wherein the plurality of widget slots comprises locations in a graphical user interface that are assigned to the plurality of widgets and the contextual data comprises ranking scores and ranking uncertainties for the plurality of widgets;
generating a plurality of distributions for the plurality of widgets using the ranking scores and ranking uncertainties for the plurality of widgets;
creating a plurality of sampled rankings for the plurality of widgets by sampling the plurality of distributions;
generating feature vectors for a new widget of the plurality of widgets using the plurality of sampled rankings;
training a machine learning ranking model using the feature vectors, wherein the machine learning ranking model comprises a plurality of model weights for the plurality of widget slots;
retrieving the plurality of model weights for the plurality of widget slots;
computing a plurality of expected rewards and reward uncertainties for the plurality of model weights;
applying the machine learning ranking model to the plurality of widgets including the new widget, wherein the applying comprises ranking the plurality of widgets based on the plurality of expected rewards and reward uncertainties;
causing presentation of the new widget in the graphical user interface via a widget slot of the plurality of widget slots determined using the plurality of model weights of the machine learning ranking model; and
receiving reward data via the graphical user interface in response to the presentation of the new widget via the widget slot determined using the plurality of model weights of the machine learning ranking model, wherein receiving the reward data comprises:
receiving, from the graphical user interface, a relevance score for the presentation of the new widget in the widget slot based on a user interaction with the new widget;
determining the reward data using the relevance score; and
updating a model weight of the plurality of model weights for the new widget based on the reward data.
2 . The method of claim 1 , further comprising:
generating an engagement feature for the new widget using the query data, wherein the feature vectors include the engagement feature.
3 . The method of claim 2 , wherein receiving the query data comprises:
receiving a query including the query data from a user, wherein the query data comprises a query input of the query and metadata of the query.
4 . The method of claim 3 , wherein generating contextual data comprises:
determining historical activity data for the user using the metadata; and
generating the contextual data using the historical activity data.
5 . The method of claim 3 , wherein generating the engagement feature comprises:
generating the engagement feature using the query input and the metadata.
6 . The method of claim 1 , wherein generating the plurality of distributions comprises:
generating a distribution of the plurality of distributions for the new widget in the widget slot, wherein the distribution has a mean of a ranking score for the new widget in the widget slot and a standard deviation of a ranking uncertainty for the new widget in the widget slot.
7 . The method of claim 1 , wherein determining the reward data using the relevance score comprises:
determining the reward data based on a placement of an assigned widget slot in the plurality of widget slots.
8 . A system comprising:
at least one memory device; and
a processing device, operatively coupled with the at least one memory device, to:
based on received query data, generate contextual data for a plurality of widgets and a plurality of widget slots, wherein the plurality of widget slots comprises locations in a graphical user interface that are assigned to the plurality of widgets and the contextual data comprises ranking scores and ranking uncertainties for the plurality of widgets;
generate a plurality of distributions for the plurality of widgets using the ranking scores and ranking uncertainties for the plurality of widgets;
create a plurality of sampled rankings for the plurality of widgets by sampling the plurality of distributions;
generate feature vectors for a new widget of the plurality of widgets using the plurality of sampled rankings;
train a machine learning ranking model using the feature vectors, wherein the machine learning ranking model comprises a plurality of model weights for the plurality of widget slots;
retrieve the plurality of model weights for the plurality of widget slots;
compute a plurality of expected rewards and reward uncertainties for the plurality of model weights;
apply the machine learning ranking model to the plurality of widgets including the new widget, wherein the applying comprises ranking the plurality of widgets based on the plurality of expected rewards and reward uncertainties;
cause presentation of the new widget in the graphical user interface via a widget slot of the plurality of widget slots determined using the plurality of model weights of the machine learning ranking model; and
receive reward data via the graphical user interface in response to the presentation of the new widget via the widget slot determined using the plurality of model weights of the machine learning ranking model, wherein receiving the reward data comprises:
receiving, from the graphical user interface, a relevance score for the presentation of the new widget in the widget slot based on a user interaction with the new widget;
determining the reward data using the relevance score; and
updating a model weight of the plurality of model weights for the new widget based on the reward data.
9 . The system of claim 8 , wherein the processing device is further to:
generate an engagement feature for the new widget using the query data, wherein the feature vectors include the engagement feature.
10 . The system of claim 9 , wherein the processing device is further to:
receive a query including the query data from a user, wherein the query data comprises a query input of the query and metadata of the query.
11 . The system of claim 10 , wherein the processing device is further to:
determine historical activity data for the user using the metadata; and
generate the contextual data using the historical activity data.
12 . The system of claim 10 , wherein the processing device is further to:
generate the engagement feature using the query input and the metadata.
13 . The system of claim 8 , wherein generating the plurality of distributions comprises:
generating a distribution of the plurality of distributions for the new widget in the widget slot, wherein the distribution has a mean of a ranking score for the new widget in the widget slot and a standard deviation of a ranking uncertainty for the new widget in the widget slot.
14 . A non-transitory computer readable medium comprising instructions that when executed by a processing device cause the processing device to:
based on received query data, generate contextual data for a plurality of widgets and a plurality of widget slots, wherein the plurality of widget slots comprises locations in a graphical user interface that are assigned to the plurality of widgets and the contextual data comprises ranking scores and ranking uncertainties for the plurality of widgets;
generate a plurality of distributions for the plurality of widgets using the ranking scores and ranking uncertainties for the plurality of widgets;
create a plurality of sampled rankings for the plurality of widgets by sampling the plurality of distributions;
generate feature vectors for a new widget of the plurality of widgets using the plurality of sampled rankings;
train a machine learning ranking model using the feature vectors, wherein the machine learning ranking model comprises a plurality of model weights for the plurality of widget slots;
retrieve the plurality of model weights for the plurality of widget slots;
compute a plurality of expected rewards and reward uncertainties for the plurality of model weights;
apply the machine learning ranking model to the plurality of widgets including the new widget, wherein the applying comprises ranking the plurality of widgets based on the plurality of expected rewards and reward uncertainties;
cause presentation of the new widget in the graphical user interface via a widget slot of the plurality of widget slots determined using the plurality of model weights of the machine learning ranking model; and
receive reward data via the graphical user interface in response to the presentation of the new widget via the widget slot determined using the plurality of model weights of the machine learning ranking model, wherein receiving the reward data comprises:
receiving, from the graphical user interface, a relevance score for the presentation of the new widget in the widget slot based on a user interaction with the new widget;
determining the reward data using the relevance score; and
updating a model weight of the plurality of model weights for the new widget based on the reward data.
15 . The non-transitory computer readable medium of claim 14 , wherein the instructions when executed by the processing device further cause the processing device to:
determine the reward data based on a placement of an assigned widget slot in the plurality of widget slots.