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:
- retrieve prior orders received from users of a computer system, each order including one or more items;
- generate, from the prior orders, a tensor having more than two dimensions, each element of the tensor corresponding to a user, an item, and an additional item and having a value indicating a connection between the item and the additional item in the one or more prior orders;
- apply a trained tensor decomposition model to the tensor to generate an item embedding for each item and a user embedding for each user, wherein the item embedding and the user embedding occupy a common latent space;
- receive, via a user interface of a client device, a request from a user for an order, requesting one or more items to be included in the order;
- generate an order embedding for the order from item embeddings for the one or more items included in the order;
- identify a set of candidate items identified by the order;
- generate a score for each candidate item of the set, the score for a candidate item of the set based on the order embedding for the order and an item embedding of the candidate item;
- select one or more candidate items based on the generated scores;
- and
- transmit an interface to the client device of the user including information describing the selected one or more candidate items.