LeveredDocs
Concepts

Design Factors

The variables that an optimization changes, such as headline text, button color and layout, and the levels of each factor.

Design factors are the variables that an optimization changes. Each factor has a set of levels, which are the values it can take. The model serves combinations of levels and learns which combination produces the highest reward.

Factors and levels

A factor is one dimension of the decision. A level is one option within that dimension.

FactorLevels
headline"Start free today", "Boost your revenue", "See it in action"
cta_text"Sign up", "Get started"
show_testimonialtrue, false

Each factor has a name and a data type. Supported types:

  • str. A string value, used for text, layout names, color codes or any other categorical choice.
  • bool. A boolean value (true or false), used to switch an element on or off.

A factor can also have a label, a description and a hypothesis. A level can have a label and a description. These fields change how the dashboard displays the factor. They do not change what the SDK serves. They can be edited at any status, for example with levered optimizations label.

Variants

A variant is a combination of one level from each factor. Levered generates all combinations. Combinations listed as excluded when the optimization is created (excluded_combinations in the API, --excluded-combinations in the CLI) are never served. The limit of 100 variants counts all combinations, including excluded ones.

The factors above produce 3 headlines x 2 CTA texts x 2 testimonial options = 12 variants.

The SDK serves a variant to a user as one object:

{
  "headline": "Boost your revenue",
  "cta_text": "Get started",
  "show_testimonial": true
}

The model learns which of the 12 variants produces the highest reward.

Choosing factors

  • Limit the number of variants. Each additional factor multiplies the number of variants. 3 factors with 3 levels each produce 27 variants. An optimization can have at most 100 variants, so 5 factors with 4 levels each (1,024 variants) are rejected. The more variants an optimization has, the more data the model needs to converge.
  • Use levels that differ clearly. The model learns fastest when the levels produce measurably different outcomes. "Sign up" and "Sign up now" are unlikely to produce a clear difference.
  • Combine changes that belong together. If a headline and a subheadline change together, define them as one factor.

Personalization with context

If the optimization has context factors, the best variant can differ between user segments. For example, the model can learn that users from Germany respond better to "Start free today" and users from the US respond better to "Boost your revenue".

The context factors define the segments. The model estimates the reward of each variant for each combination of context values.