> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trycurious.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rewards

> Rewards are the events that define success: type, window, weight, properties filter, value source and baseline rate, and how they combine.

**Rewards** are the events that define success for an element. Each is declared by event name, with an optional window, weight, type and filter. Curious optimizes the composite: the weighted sum of the expected rewards.

```json theme={null}
"rewards": [
  { "name": "purchased", "type": "semicontinuous", "window_seconds": 86400, "weight": 1.0, "properties": { "plan": "pro" } },
  { "name": "refunded", "weight": -0.5, "window_seconds": 2592000 },
  "clicked"
]
```

A bare name is shorthand for a binary reward with the defaults. `rewards` accepts a name, an object, or a list of either.

## Fields

| Field | Default | Meaning |
| - | - | - |
| `name` | required | The event's past-tense name, matched exactly against `events.name`. |
| `type` | `binary` | The statistical shape of the outcome; see below. |
| `window_seconds` | `86400` | How long after the decision an event still counts. At least 1. |
| `weight` | `1` | The reward's share of the composite. Finite and non-zero; negative makes it a cost. |
| `properties` | none | Only events whose `properties` match these keys attribute to this reward. |
| `value` | `event.value` | Where a `semicontinuous` reward reads its amount; see below. |
| `baseline_rate` | none | The rate the control achieves today, as prior information. |

## Types

The type is the statistical shape of the outcome and selects the model Curious fits. It is declared, never guessed from data.

* **`binary`**: did it happen. `email_clicked`, `signed_up`. The event's value is ignored.
* **`count`**: how many times. `added_seats`, `pages_viewed`. Each event counts once regardless of its value.
* **`semicontinuous`**: did it happen, and how much. `purchased` with an amount. Zero when it did not happen, the amount when it did.
* **`continuous`**: a measured value every time. `nps_submitted` with a score.

## Where a semicontinuous amount comes from

`value` names the source, for `semicontinuous` rewards only. `event.value` (the default) reads the event's `value`. `event.properties.<key>` reads a property, such as `event.properties.amount_usd`. `arm.<field>` reads a top-level field of the served arm's content, which is how a price in the content becomes the amount; the format must then bound that field as a number with `min` and `max`.

## Weights and costs

The composite is `sum(weight × expected reward)`. A negative weight turns an event into something Curious avoids: `refunded` at `-0.5`, `unsubscribed` at `-1`. Weight `0` is a `400`, because a reward that counts for nothing should not be declared.

## Windows

The window starts at the decision. An event inside it attributes to that decision; an event after it does not. A new decision for the same user and element ends the previous decision's window early, so an event always lands in exactly one window. Give each reward the window its outcome needs: a day for a click, a month for a refund. See [Events and attribution](https://docs.trycurious.ai/concepts/events.md).

## Baseline rate

`baseline_rate` is optional prior information: the rate the control achieves today, in the reward's own units. For `binary` and `semicontinuous` rewards it is an occurrence probability strictly between 0 and 1; for `count` a strictly positive expected count; for `continuous` any finite value. It sharpens Curious's starting beliefs and is monitored against what the control actually does. It is never identity: changing it does not restart the experiment, and it is read once, when the experiment is created.

## Changing rewards

Rewards fix the structure of the model, so any change to the list supersedes the experiment and starts a new one. Declare them deliberately and keep them in one place. See [Declarations](https://docs.trycurious.ai/concepts/declarations.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.