Update Eval Grader (partial)

Rename a grader or replace its definition. Runs already scored keep the definition they ran with.

Rename a grader or replace its definition. Runs already scored keep the definition they ran with.

patchhttps://statsigapi.net/console/v1/eval_graders/{name}

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Path parameters

namestringrequired

name

Body

application/json
namestring
Constraints:min length: 1
promptobject

Replaces the whole definition when present.

Show child attributes
typestringrequired

label_model is an LLM judge over {{output}} (content is the rubric); string_check compares {{output}} to a dataset column with operation; text_similarity scores {{output}} against a column with evaluation_metric; python runs source.

Allowed values:label_modelstring_checktext_similaritypython
contentstring

Rubric for label_model. May reference {{output}} and dataset columns.

Constraints:nullable
operationstring
Allowed values:eqnelikeilike
Constraints:nullable
evaluation_metricstring

Similarity measure for text_similarity.

Allowed values:fuzzy_matchbleugleumeteorrouge_1rouge_2rouge_3rouge_4rouge_5rouge_lcosine
Constraints:nullable
columnstring

Dataset column compared against for string_check and text_similarity.

Constraints:nullable
sourcestring

Python source for a python grader.

Constraints:nullable
evalModelstring

OpenAI model that judges a label_model grader, such as gpt-5-mini. Other grader types ignore it. An unsupported model returns a 400. Defaults to gpt-5-mini on create; omit it on update to keep the current model.

Constraints:min length: 1
gradingRulesobject[]

Replaces the grader's ordered online grading rules. Enabled rules start online grading of matching live spans without attaching the grader to a prompt or turning on Auto Eval, so changing which rules are enabled needs a project or org admin. Only graders whose definition reads just {{input}}, {{output}} and {{trajectory}} can have rules. AI config and version IDs must exist.

Show child attributes
idstring

Omit for a new rule. Keep it to update an existing one.

enabledbooleanrequired
conditionsobject[]required

Combined with AND. A rule with no conditions matches every span.

fieldstringrequired

Span field to match: ai_config (AI config IDs, matched by the config name), config_version (version IDs), environment (statsig.environment), span_name, agent_name (gen_ai.agent.name), model (gen_ai.request.model), or span_attribute (the attribute named by key).

Allowed values:ai_configconfig_versionenvironmentspan_nameagent_namemodelspan_attribute
keystring

Attribute name of a span_attribute condition.

operatorstringrequired

is matches any of the values exactly and is_not matches none of them. A span without the field reads as an empty string.

Allowed values:isis_not
valuesstring[]required
samplingRatenumberrequired

Percentage of matching traces to grade, from 0 to 100. Sampling is by trace ID, so every span of a trace gets the same decision.

Constraints:min: 0max: 100
offlineTargetsoneOf[]

AI configs (by aiConfigID) and datasets (by datasetID) the grader scores in offline evals. Replaces the whole list when present. Detaching an AI config where the grader runs online is rejected; turn off online grading on the config first.

Show child attributes
One of 2 shapes:
typestringrequired
Allowed values:ai_config
aiConfigIDstringrequired
isCriticalbooleanrequired

Response

application/json
200· Update Eval Grader
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
idstringrequired
namestringrequired
typestringrequired

Grader type: label_model, string_check, text_similarity, python, completion_tokens, completion_latency, or logged_score.

isGlobalbooleanrequired
promptoneOfrequired
Constraints:object
One of 8 shapes:
typestringrequired
Allowed values:label_model
contentstringrequired
evalModelstringrequired

OpenAI model that judges a label_model grader. Other grader types ignore it.

choiceScoresobjectrequired
Constraints:nullable
gradingRulesobject[]required

Ordered online grading rules. For each span, the first enabled rule that matches decides whether the grader scores it.

idstringrequired
enabledbooleanrequired
conditionsobject[]required

Combined with AND. A rule with no conditions matches every span.

fieldstringrequired

Span field to match: ai_config (AI config IDs, matched by the config name), config_version (version IDs), environment (statsig.environment), span_name, agent_name (gen_ai.agent.name), model (gen_ai.request.model), or span_attribute (the attribute named by key).

Allowed values:ai_configconfig_versionenvironmentspan_nameagent_namemodelspan_attribute
keystring

Attribute name of a span_attribute condition.

operatorstringrequired

is matches any of the values exactly and is_not matches none of them. A span without the field reads as an empty string.

Allowed values:isis_not
valuesstring[]required
samplingRatenumberrequired

Percentage of matching traces to grade, from 0 to 100. Sampling is by trace ID, so every span of a trace gets the same decision.

Constraints:min: 0max: 100
offlineTargetsoneOf[]required

AI configs and datasets the grader scores in offline evals. A version evaluation of an AI config runs its graders and its dataset's graders. An eval run on a dataset always includes that dataset's graders.

One of 2 shapes:
typestringrequired
Allowed values:ai_config
aiConfigIDstringrequired
isCriticalbooleanrequired
createdTimenumberrequired
Constraints:format: double
lastModifiedTimenumberrequired
Constraints:format: double
404· Not Found. The requested resource could not be found.
statusintegerrequired
Allowed values:404
messagestringrequired

Was this helpful?

For AI agents: a documentation index is available at /llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.