Program Lifetime

Program lifetime rule allows to downscore an episode based on its age since publication and computed relevance period of the program it belongs to. If an episode is too old (i.e. less relevant), it will be downscored and therefore will have a lower chance to be recommended.

For example, news shows have a very low relevance period, while documentaries often stay relevant for years. Similarly, programs where new episodes are issued every day most likely have a short relevance period while ones which publish new episodes rarely have longer relevance.

Lifetime is usually not available as part of content metadata. Because of that we compute episode lifetimes automatically. Assuming that all episodes of a program have similar relevance period, we only compute lifetimes of each program and assign it to all episodes which belong to it.

Program lifetime is computed by scanning all watch/listen events of all episodes. For each episode, the time period between the first consumption event and the 80% of events is recorded. Then the data for all episodes is aggregated and the program's lifetime is computed as the average of all existing episode lifetimes. This way even lifetime of new episodes is always known. This computation runs periodically to refine lifetimes of existing programs as well as to compute lifetimes of new ones.


The code of lifetime computation is available in PEACH Notebooks: pipe_algorithms > notebooks > tutorials > business-rules > program_lifetime_task.ipynb. It is generic and can easily be adapted to compute lifetimes of any program from any organisation. Note that in addition to consumption events, the computation requires metadata that maps episodes onto the programs they belong to.

Now that we have program lifetimes available, we can apply the rule to downscore episodes which exceeded their computed relevance period. They are not completely filtered out, but their scores fall exponentially as the relevance threshold is being exceed further.

Learn how to apply this business rule to algorithms.