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.
https://statsigapi.net/console/v1/eval_graders/{name}Authorizations
STATSIG-API-KEYstringrequiredapiKey (header)
Path parameters
namestringrequiredname
Body
application/jsonnamestringmin length: 1promptobjectReplaces the whole definition when present.
Show child attributes
typestringrequiredlabel_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.
label_modelstring_checktext_similaritypythoncontentstringRubric for label_model. May reference {{output}} and dataset columns.
nullableoperationstringeqnelikeilikenullableevaluation_metricstringSimilarity measure for text_similarity.
fuzzy_matchbleugleumeteorrouge_1rouge_2rouge_3rouge_4rouge_5rouge_lcosinenullablecolumnstringDataset column compared against for string_check and text_similarity.
nullablesourcestringPython source for a python grader.
nullableevalModelstringOpenAI 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.
min length: 1gradingRulesobject[]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
idstringOmit for a new rule. Keep it to update an existing one.
enabledbooleanrequiredconditionsobject[]requiredCombined with AND. A rule with no conditions matches every span.
fieldstringrequiredSpan 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).
ai_configconfig_versionenvironmentspan_nameagent_namemodelspan_attributekeystringAttribute name of a span_attribute condition.
operatorstringrequiredis matches any of the values exactly and is_not matches none of them. A span without the field reads as an empty string.
isis_notvaluesstring[]requiredsamplingRatenumberrequiredPercentage of matching traces to grade, from 0 to 100. Sampling is by trace ID, so every span of a trace gets the same decision.
min: 0max: 100offlineTargetsoneOf[]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
typestringrequiredai_configaiConfigIDstringrequiredisCriticalbooleanrequiredResponse
application/jsonmessagestringrequiredA simple string explaining the result of the operation.
dataobjectrequiredShow child attributes
idstringrequirednamestringrequiredtypestringrequiredGrader type: label_model, string_check, text_similarity, python, completion_tokens, completion_latency, or logged_score.
isGlobalbooleanrequiredpromptoneOfrequiredobjecttypestringrequiredlabel_modelcontentstringrequiredevalModelstringrequiredOpenAI model that judges a label_model grader. Other grader types ignore it.
choiceScoresobjectrequirednullablegradingRulesobject[]requiredOrdered online grading rules. For each span, the first enabled rule that matches decides whether the grader scores it.
idstringrequiredenabledbooleanrequiredconditionsobject[]requiredCombined with AND. A rule with no conditions matches every span.
fieldstringrequiredSpan 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).
ai_configconfig_versionenvironmentspan_nameagent_namemodelspan_attributekeystringAttribute name of a span_attribute condition.
operatorstringrequiredis matches any of the values exactly and is_not matches none of them. A span without the field reads as an empty string.
isis_notvaluesstring[]requiredsamplingRatenumberrequiredPercentage of matching traces to grade, from 0 to 100. Sampling is by trace ID, so every span of a trace gets the same decision.
min: 0max: 100offlineTargetsoneOf[]requiredAI 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.
typestringrequiredai_configaiConfigIDstringrequiredisCriticalbooleanrequiredcreatedTimenumberrequiredformat: doublelastModifiedTimenumberrequiredformat: doublestatusintegerrequired404messagestringrequiredWas 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.