# Experimentation (/entities/experimentation)



Test with real revenue data. Validate business hypotheses. Roll out progressively.

Experiment [#experiment]

A/B tests, multivariate tests, feature flag experiments, ML experiments, and prompt experiments.

```typescript
import { Noun } from 'digital-objects'

export const Experiment = Noun('Experiment', {
  name: 'string!',
  slug: 'string##',
  description: 'string',
  hypothesis: 'string',
  type: 'ABTest | Multivariate | FeatureFlag | MLExperiment | PromptExperiment',
  status: 'Draft | Running | Paused | Completed | Archived',
  organization: '-> Organization',
  owner: '-> Contact',
  startAt: 'datetime',
  endAt: 'datetime',
  targetAudience: 'string',
  trafficAllocation: 'number',
  variants: 'string',
  metrics: 'string',
  primaryMetric: 'string',
  results: 'string',
  winner: 'string',
  confidence: 'number',
  sampleSize: 'number',
  conversions: 'number',
  tags: 'string',
  start: 'Started',
  conclude: 'Concluded',
  pause: 'Paused',
})
```

| Verb       | Event       | Description                      |
| ---------- | ----------- | -------------------------------- |
| `start`    | `Started`   | Begin running the experiment     |
| `conclude` | `Concluded` | Declare results and winner       |
| `pause`    | `Paused`    | Temporarily pause the experiment |

FeatureFlag [#featureflag]

Progressive rollouts, beta access, kill switches.

```typescript
export const FeatureFlag = Noun('FeatureFlag', {
  key: 'string!##',
  name: 'string!',
  description: 'string',
  organization: '-> Organization',
  experiment: '-> Experiment',
  type: 'Boolean | String | Number | JSON',
  defaultValue: 'string',
  variants: 'string',
  targetingRules: 'string',
  status: 'Draft | Active | Paused | Archived',
  rolloutPercentage: 'number',
  evaluations: 'number',
  lastEvaluatedAt: 'datetime',
  rollout: 'RolledOut',
  enable: 'Enabled',
  disable: 'Disabled',
})
```

| Verb      | Event       | Description                 |
| --------- | ----------- | --------------------------- |
| `rollout` | `RolledOut` | Increase percentage rollout |
| `enable`  | `Enabled`   | Turn on the flag            |
| `disable` | `Disabled`  | Turn off the flag           |
