Levered Docs
Concepts

Design Features

The variables you control in an optimization -- headline text, button color, layout -- and the levels each feature can take.

Design features are the variables you want to optimize. Each feature has a set of levels -- the possible values it can take. The bandit explores combinations of levels across all features to find what works best.

Features and levels

A feature is a single dimension of your decision. A level is one option within that dimension.

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

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

  • str -- a string value. Most common. Used for text variants, layout names, color codes, or any categorical choice.
  • bool -- a boolean value (true / false). Useful for toggling features on or off.

Variants

A variant is a specific combination of levels, one from each feature. Levered generates all possible combinations automatically.

With the features above:

  • 3 headlines x 2 CTA texts x 2 testimonial options = 12 variants

Each variant is a complete configuration that gets served to a user:

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

The bandit learns which of these 12 combinations produces the highest reward.

Designing good features

A few practical guidelines:

  • Keep the number of combinations manageable. Each additional feature multiplies the variant space. 3 features with 3 levels each gives 27 variants. 5 features with 4 levels each gives 1,024. More variants means more data is needed before the model converges.
  • Make levels meaningfully different. The bandit learns fastest when the levels produce measurably different outcomes. Testing "Sign up" vs "Sign up now" is unlikely to produce a clear signal.
  • Group related changes. If a headline and subheadline always change together, consider combining them into a single feature rather than treating them as independent.

Personalization with context

When you use a CMAB model, the best variant can differ depending on who the user is. The model might learn that users from Germany respond better to "Start free today" while US users prefer "Boost your revenue."

This personalization happens automatically. You define the design features (what to optimize) and the context features (what to personalize on), and the model figures out the interaction between them.