docbrown/config/feed-variants
Dwight Scott f19fa13215
new feed variant 20220518 (#17722)
* new feed variant 20220518

* source code in favor of the spreadsheet

* remove following_org and follow_author in favor of query performance
2022-05-18 18:09:05 -04:00
..
20220415-incumbent.json Refactoring so relevancy levers define expected variables (#17591) 2022-05-06 13:54:33 -04:00
20220422-variant.json Adding new relevancy lever for privileged reactions (#17598) 2022-05-09 11:32:57 -04:00
20220509-variant.json Adding new relevancy lever for privileged reactions (#17598) 2022-05-09 11:32:57 -04:00
20220518-variant.json new feed variant 20220518 (#17722) 2022-05-18 18:09:05 -04:00
original.json Refactoring so relevancy levers define expected variables (#17591) 2022-05-06 13:54:33 -04:00
README.md Refactoring so relevancy levers define expected variables (#17591) 2022-05-06 13:54:33 -04:00

Feed Variants

This folder contains the feed variants that we have, are, or will be testing. By convention the file's basename without extension is the name of the variant (e.g. "./config/feed-variants/20220415-incumbent.json" encodes the variant named 20220415-incumbent).

There exists one variant, original.json, which is our fallback variant. This fallback is performant and adequate for generating the feed for DEV.to. It is present in case we need to quickly turn off an experiment. The name original is the same as the AbExperiment::ORIGINAL_VARIANT constant.

Do not remove original.json without consideration for how to rollback a feed experiment.

Variants are loaded into production as needed. That "need" is determined by the configuration of the ./config/field_test.yml. Once we load a variant into production, we cache that variant (see Articles::Feeds::VariantAssembler.variants_cache).

As part of our test suite we assemble and verify each defined variant.

How to Make a Feed Variant

A feed variant is written in JSON format. A feed variant configures one or more Articles::Feeds::RelevancyLevers. The variant configuration defines:

  • The cases and fallback for each of the selected relevancy levers
  • Optionally the sort order of the query results
  • Optionally a few high level parameters.

The relevancy levers and their SQL query fragments are defined in Articles::Feeds::LEVER_CATALOG. Any levers not configured for a variant are omitted for that variant (but available for other variants).

The available sort order is also defined in Articles::Feeds::LEVER_CATALOG.

The high level parameters are defined in Aritcles::Feeds::VariantQuery::Config and as of <2022-05-06 Fri> are:

  • max_days_since_published: only consider articles that were published no more than the max_days_since_published.