# Constant Sum

Source: https://www.potatoannotator.com/docs/annotation-types/constant-sum

The constant sum annotation schema lets annotators distribute a fixed number of points across multiple categories. Unlike soft labels which use linked sliders, constant sum supports both direct number inputs and sliders, and is designed for tasks where annotators must make explicit trade-off decisions within a fixed budget.

## Overview

Constant sum tasks are common in survey research and preference elicitation. Annotators are given a fixed pool of points (e.g., 100) and must allocate them across items to express relative importance, preference, or proportion. The interface enforces that allocations always sum to the configured total.

## Quick Start

```yaml
annotation_schemes:
  - annotation_type: constant_sum
    name: feature_importance
    description: Distribute 100 points across features based on their importance.
    labels: ["Accuracy", "Speed", "Ease of Use", "Cost"]
    total_points: 100
```

## Configuration Options

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `annotation_type` | string | Required | Must be `"constant_sum"` |
| `name` | string | Required | Unique identifier for this schema |
| `description` | string | Required | Instructions displayed to annotators |
| `labels` | array | Required | List of items to allocate points across (minimum 2) |
| `total_points` | integer | `100` | The fixed total that allocations must sum to |
| `min_per_item` | integer | `0` | Minimum points each item must receive |
| `input_type` | string | `"number"` | Input method: `"number"` for text fields or `"slider"` for slider controls |
| `label_requirement.required` | boolean | `false` | Whether the annotation must be completed before moving on |

## Examples

### Feature Prioritization

```yaml
annotation_schemes:
  - annotation_type: constant_sum
    name: feature_priority
    description: Allocate 100 points to indicate which features matter most to you.
    labels: ["Performance", "Reliability", "Usability", "Security"]
    total_points: 100
    input_type: number
```

### Budget Allocation

```yaml
annotation_schemes:
  - annotation_type: constant_sum
    name: budget_allocation
    description: How would you distribute a $1000 budget across these areas?
    labels: ["Marketing", "Engineering", "Design", "Research"]
    total_points: 1000
    input_type: slider
    min_per_item: 50
```

### Time Distribution

```yaml
annotation_schemes:
  - annotation_type: constant_sum
    name: time_spent
    description: Distribute 24 points (hours) across daily activities.
    labels: ["Work", "Sleep", "Exercise", "Leisure", "Commute", "Other"]
    total_points: 24
    min_per_item: 0
    label_requirement:
      required: true
```

### Simple Comparison with Sliders

```yaml
annotation_schemes:
  - annotation_type: constant_sum
    name: text_comparison
    description: Distribute 10 points between the two texts based on quality.
    labels: ["Text A", "Text B"]
    total_points: 10
    input_type: slider
```

## Output Format

```json
{
  "feature_importance": {
    "labels": {
      "Accuracy": 40,
      "Speed": 25,
      "Ease of Use": 20,
      "Cost": 15
    }
  }
}
```

Values always sum to the configured `total_points`.

## Best Practices

1. **Choose an intuitive total** - 100 works well for percentages; smaller totals (10, 20) are easier for quick tasks
2. **Use number inputs for precision** - when exact values matter, number fields are more accurate than sliders
3. **Use sliders for speed** - slider inputs are faster for approximate allocations
4. **Limit the number of items** - more than 7-8 items makes point allocation cognitively demanding
5. **Consider minimum allocations** - use `min_per_item` when every category should receive at least some points
6. **Provide clear context** - explain what the points represent (importance, time, money, etc.)

## Further Reading

- [Soft Label](/docs/annotation-types/soft-label) - Probability distribution with linked sliders
- [Best-Worst Scaling](/docs/annotation-types/best-worst-scaling) - Relative preference annotation
- [Likert Scales](/docs/annotation-types/likert-scales) - Ordinal rating scales

For implementation details, see the [source documentation](https://github.com/davidjurgens/potato/blob/main/docs/annotation_schemes.md).
