Patent attributes
An online system causes a graphical user interface to display at a client device. The graphical user interface includes a story field that displays ephemeral content items which are created within a threshold time period and are automatically removed after the time period. The online system uses a computer learned model to rank the selected ephemeral content items for display. The display of a set of ephemeral content items is associated with a session. The computer learned model is trained with sample sets that use an entire past session that includes a plurality of ephemeral content items. The computer model proposes a ranked order of the content items in the past session. Based on the past user actions performed on the past content items, a normalized discounted cumulative gain is determined for the past session. The computer model is trained to optimize the normalized discounted cumulative gain.