mozilla / taar-lite

A lightweight version of the TAAR service intended for specific deployments with reduced feature visibility.
Mozilla Public License 2.0
2 stars 6 forks source link

Fallback condition should return a random selection of Featured extensions #34

Open mlopatka opened 6 years ago

mlopatka commented 6 years ago

When recommendations can not be generated for whatever reason, the fallback condition from TAAR-lite should no longer be an empty list. Rather a random selection of Featured addons sampled to ensure a diversity of categories are represented should be the new behaviour of TAAR-lite.

ETL job to make this available is already submitted against python_mozetl.

The JSON blob needs to be extended, or the HTTP response needs to be extended so that AMO can detect which resultset their getting (TAARlite vs randomized featured)

mlopatka commented 6 years ago

@crankycoder there may already be a shortcut to pulling the featured extensions: https://addons.mozilla.org/en-GB/firefox/extensions/?sort=featured

crankycoder commented 6 years ago

This depends on https://github.com/mozilla/python_mozetl/issues/233

The guid recommender will need to be extended to load the featured addon list to generate these results.

crankycoder commented 6 years ago

Select addons from each category - weighting the category inversely to the frequency of the category. Basically - don't let categories with 3 addons constantly show up compared to a category with 100s of addons.

crankycoder commented 6 years ago

See: https://eli.thegreenplace.net/2010/01/22/weighted-random-generation-in-python