Hanzo

Score Configs

Score definitions — data types, ranges, and categories that every score conforms to.

Score Configs

A score config is the schema for a score: its data type and its valid range or set of categories. Configs make scores consistent — a helpfulness numeric always runs 1–5, a sentiment categorical always uses the same labels. Served by Hanzo O11y, tenant-scoped by org.

Data types

dataTypeConstraint fieldsUse for
NUMERICminValue, maxValueRatings and rubric scores (1–5, 0.0–1.0)
CATEGORICALcategories[]Labeled buckets (good / neutral / bad)
BOOLEANcategories[] (True/False)Pass/fail checks
TEXTFree-text judgments

Each entry in categories is a { label, value } pair, so a categorical score carries a human-readable label and a numeric code for aggregation.

Listing configs

curl "https://api.hanzo.ai/v1/o11y/score-configs?page=1&limit=50" \
  -H "Authorization: Bearer hk-..."
{
  "data": [
    {
      "id": "cfg_help",
      "name": "helpfulness",
      "dataType": "NUMERIC",
      "minValue": 1,
      "maxValue": 5,
      "isArchived": false
    },
    {
      "id": "cfg_sentiment",
      "name": "sentiment",
      "dataType": "CATEGORICAL",
      "categories": [
        { "label": "positive", "value": 1 },
        { "label": "neutral", "value": 0 },
        { "label": "negative", "value": -1 }
      ],
      "isArchived": false
    }
  ],
  "meta": { "page": 1, "limit": 50, "totalItems": 2, "totalPages": 1 }
}

Archived configs stay attached to historical scores but are hidden from new scoring. A config is referenced by a score through its configId, and by an annotation queue through scoreConfigIds.

How is this guide?

Last updated on

On this page