Metric

Update a metric variant

Changed on

Rename a variant, change its configuration, or both. Every configuration change creates a new immutable version and advances versionId; the response carries the advanced value.

Editing one of Roark’s own variants forks it for your organization. The response carries the new variant’s id, which will differ from the one in the path, and isSystem becomes false. Roark’s variant is untouched and other organizations keep it. DELETE your fork to go back to it.

Which fields are editable depends on the metric: some Roark metrics lock their prompt or output configuration, and a locked field is rejected rather than ignored.

put/v1/metric/definitions/{idOrSlug}/variants/{variantId}

Request

  • Base URL
    https://api.roark.ai
  • URL
    https://api.roark.ai/v1/metric/definitions/{idOrSlug}/variants/{variantId}
  • Auth
    HTTP bearer

Path parameters

idOrSlugstring required

Metric definition UUID or its stable slug.

variantIdstring uuid required

Variant UUID.

Request body

namestring

Rename the variant. Does not change its configuration, so versionId is unaffected. Default is reserved.

llmPromptstring

The rubric this variant applies. LLM judge metrics only.

scaleMininteger

Scale minimum. SCALE output only.

scaleMaxinteger

Scale maximum. SCALE output only.

booleanTrueLabelstring

What a true value means. Given to the judge as its polarity rule, so keep it accurate.

booleanFalseLabelstring

What a false value means. Given to the judge as its polarity rule, so keep it accurate.

maxClassificationsinteger

Maximum classifications returned. CLASSIFICATION output only.

changeReasonstring

Free-text audit note recorded on the new version.

Example request

{
  "llmPrompt": "Did the agent verify identity before disclosing anything? {{transcript}}"
}

Response

The updated variant, or your organization’s fork of it

Changes