Skip to main content
POST
Revise metric configuration with AI ("Update With AI")

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Body

application/json
name
string
required

The metric's user-authored name — context for the revision, not returned in the response.

Required string length: 1 - 200
Example:

"Refusal Quality"

evaluationType
enum<string>
required

PARTIAL_PROMPT (binary LLM judge) or HUMAN_EVALUATION (0-100 annotator guidelines).

Available options:
PARTIAL_PROMPT,
HUMAN_EVALUATION
currentJudgePrompt
string
required

The metric's current judge prompt — the starting point the revision builds on.

Required string length: 1 - 20000
feedback
string
required

Free-text instruction describing what to change about the current judge prompt.

Required string length: 1 - 2000
Example:

"it should not penalise a short answer"

description
string

The metric's user-authored description — the criteria the judge prompt must evaluate.

Required string length: 1 - 5000
currentEvaluationParams
string[]

The metric's current evaluation parameters, changed only if the feedback requires it. Always send them when the metric has any; omitting them can produce a revision whose declared parameters do not match its prompt.

Maximum array length: 20
Required string length: 1 - 64
tags
string[]

The metric's user-provided tags — context for the revision, not returned in the response.

Maximum array length: 20
Required string length: 1 - 64
productId
string

Optional product ID for additional context

Minimum string length: 1
Example:

"prod_123"

specificationIds
string[]

At most one specification id, forwarded as optional context.

Minimum string length: 1

Response

Revised metric configuration suggestion

judgePrompt
string
required

The revised judge prompt, built on the current one.

evaluationParams
string[]
required

The revised evaluation parameters.

description
string | null
required

The revised metric description.