Revise metric configuration with AI ("Update With AI")
Given a metric config the caller already has (name, description, judge prompt, evaluation params, evaluation type) plus one line of feedback, returns a revised judge prompt, evaluation parameters, and description. Persists nothing — the caller decides whether to apply the result.
Authorizations
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
The metric's user-authored name — context for the revision, not returned in the response.
1 - 200"Refusal Quality"
PARTIAL_PROMPT (binary LLM judge) or HUMAN_EVALUATION (0-100 annotator guidelines).
PARTIAL_PROMPT, HUMAN_EVALUATION The metric's current judge prompt — the starting point the revision builds on.
1 - 20000Free-text instruction describing what to change about the current judge prompt.
1 - 2000"it should not penalise a short answer"
The metric's user-authored description — the criteria the judge prompt must evaluate.
1 - 5000The 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.
201 - 64The metric's user-provided tags — context for the revision, not returned in the response.
201 - 64Optional product ID for additional context
1"prod_123"
At most one specification id, forwarded as optional context.
1