Skip to content
Judgment Labs
Esc
↑↓navigate↵open⌘Jpreview

Update judge

Update a judge description and/or create one complete immutable judge version. A new version requires an explicit target version, the existing judge and score types, a complete implementation config, outputs, and monitoring-settings snapshot. Categorical outputs may reference existing labels by ID or define new labels. Code judge versions take a base64-encoded tar.gz bundle, or a sourceVersion whose stored code to reuse. Alternatively, newVersionFromSource copies sourceVersion and changes only the fields you set. Set promoteToProduction to make the new version production; latest is inferred automatically. Judge and score types cannot change.

PATCH/v1/projects/{projectId}/judges/{judgeId}
Authorization
AuthorizationPersonal API key · headerrequired

Your personal API key from Settings > Personal API Keys, sent as Bearer <key>.

X-Organization-IdOrganization ID · headerrequired

The organization to act in. Copy it with Copy organization ID in the organization menu or the settings sidebar.

Path parameters
projectIdstringrequired
judgeIdstring<uuid>required

The judge ID

matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Request body
requiredapplication/json
updateobjectrequired
Show properties
judgeDescriptionstring | null

Updated human-readable judge description

newVersionobject

Complete immutable version to create

Show properties
Any of:
object
One of:
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired

Agent judge (wire value prompt)

configobjectrequired
Show properties
promptstringrequired

Complete prompt for the new version

min length 1
descriptionstring | nullrequired

Description stored on the new Agent judge version

reasoningLevelstringrequired

Reasoning level for the new Agent judge version

Allowed:litenormalhigh
minScorenumberrequired

Minimum numeric score for the new version

maxScorenumberrequired

Maximum numeric score for the new version

scoreTypestringrequired
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired

Agent judge (wire value prompt)

configobjectrequired
Show properties
promptstringrequired

Complete prompt for the new version

min length 1
descriptionstring | nullrequired

Description stored on the new Agent judge version

reasoningLevelstringrequired

Reasoning level for the new Agent judge version

Allowed:litenormalhigh
minScorenumberrequired

Minimum numeric score for the new version

maxScorenumberrequired

Maximum numeric score for the new version

scoreTypestringrequired
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired

Agent judge (wire value prompt)

configobjectrequired
Show properties
promptstringrequired

Complete prompt for the new version

min length 1
descriptionstring | nullrequired

Description stored on the new Agent judge version

reasoningLevelstringrequired

Reasoning level for the new Agent judge version

Allowed:litenormalhigh
minScorenumberrequired

Minimum numeric score for the new version

maxScorenumberrequired

Maximum numeric score for the new version

scoreTypestringrequired
outputsobject[]required

Complete categorical output set for the new version

min items 2
Show properties
Array of object
Any of:
object
behaviorIdstringrequired

An existing label ID. The field name remains behaviorId.

min length 1
object
namestringrequired

Name of the label to create

min length 1
descriptionstringrequired

Description of the label to create

categoryIdsstring[]

Label category IDs from the same project as the judge

object
One of:
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired

Code judge (wire value custom)

configobjectrequired
Show properties
Any of:
object
bundleBase64stringrequired

Base64-encoded tar.gz bundle. Decoded size must be at most 1 MiB.

min length 1 · max length 1398104
entrypointPathstringrequired

Path to the Python entrypoint inside the tar.gz bundle

min length 1
requirementsPathstring

Optional requirements file path inside the bundle

min length 1
classNamestringrequired

Python scorer class name exported by the entrypoint

min length 1
scorerTypestring | null

Input format expected by the Code judge. Defaults to 'example'.

Show properties
Any of:
string
string
null
null
sdkVersioninteger

judgeval SDK major version targeted by the Code judge

max 9007199254740991 · default: 4
descriptionstring | null

Description stored on the Code judge version

object
sourceVersionobjectrequired

Existing version whose stored code the new version reuses

Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
scoreTypestringrequired
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired

Code judge (wire value custom)

configobjectrequired
Show properties
Any of:
object
bundleBase64stringrequired

Base64-encoded tar.gz bundle. Decoded size must be at most 1 MiB.

min length 1 · max length 1398104
entrypointPathstringrequired

Path to the Python entrypoint inside the tar.gz bundle

min length 1
requirementsPathstring

Optional requirements file path inside the bundle

min length 1
classNamestringrequired

Python scorer class name exported by the entrypoint

min length 1
scorerTypestring | null

Input format expected by the Code judge. Defaults to 'example'.

Show properties
Any of:
string
string
null
null
sdkVersioninteger

judgeval SDK major version targeted by the Code judge

max 9007199254740991 · default: 4
descriptionstring | null

Description stored on the Code judge version

object
sourceVersionobjectrequired

Existing version whose stored code the new version reuses

Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
scoreTypestringrequired
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired

Code judge (wire value custom)

configobjectrequired
Show properties
Any of:
object
bundleBase64stringrequired

Base64-encoded tar.gz bundle. Decoded size must be at most 1 MiB.

min length 1 · max length 1398104
entrypointPathstringrequired

Path to the Python entrypoint inside the tar.gz bundle

min length 1
requirementsPathstring

Optional requirements file path inside the bundle

min length 1
classNamestringrequired

Python scorer class name exported by the entrypoint

min length 1
scorerTypestring | null

Input format expected by the Code judge. Defaults to 'example'.

Show properties
Any of:
string
string
null
null
sdkVersioninteger

judgeval SDK major version targeted by the Code judge

max 9007199254740991 · default: 4
descriptionstring | null

Description stored on the Code judge version

object
sourceVersionobjectrequired

Existing version whose stored code the new version reuses

Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
scoreTypestringrequired
outputsobject[]required

Complete categorical output set for the new version

min items 2
Show properties
Array of object
Any of:
object
behaviorIdstringrequired

An existing label ID. The field name remains behaviorId.

min length 1
object
namestringrequired

Name of the label to create

min length 1
descriptionstringrequired

Description of the label to create

categoryIdsstring[]

Label category IDs from the same project as the judge

object
One of:
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired
configobjectrequired
Show properties
expressionanyrequired
scoreTypestringrequired
object
actionConfigobject | null

Omit to preserve the latest version’s action groups; null clears them.

Show properties
Any of:
object
action_groupsobject[]required
Show properties
Array of object
idstringrequired
min length 1
namestringrequired

Action group display name; an empty string uses Action group 1, 2, etc.

enabledbooleanrequired
environment_namesstring[]required

Empty runs the group in every environment

whenobjectrequired

Judge result that runs the group. Categorical groups run when the result is any listed output name.

Show properties
One of:
object
kindstringrequired
object
kindstringrequired
valuebooleanrequired
object
kindstringrequired
valuesstring[]required
min items 1
object
kindstringrequired
operatorstringrequired
Allowed:ltlteeqgtegt
valuenumberrequired
frequencyobjectrequired
Show properties
countintegerrequired
min 1 · max 9007199254740991
window_secondsintegerrequired
min 1 · max 9007199254740991
cooldown_secondsintegerrequired
min 0 · max 9007199254740991
actionsobject[]required
Show properties
Array of object
One of:
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
urlstringrequired
min length 1
secretstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
email_addressstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
team_idstring
min length 1
channel_idstring
min length 1
messagestring
custom_attribute_keysstring[]
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
dataset_idstringrequired
min length 1
object
idstringrequired
min length 1
enabledbooleanrequired
typestringrequired
configobjectrequired
Show properties
judge_idsstring[]required
min items 1
null
null
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobjectrequired

Complete monitoring-settings snapshot for the new version

Show properties
online_environment_namesstring[] | nullrequired

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestringrequired

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumberrequired

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | objectrequired
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringbooleanrequired
session_evaluation_count_enabledboolean | nullrequired
session_evaluation_idle_enabledboolean | nullrequired
session_evaluation_min_candidate_tracesnumber | nullrequired
session_evaluation_max_wait_minutesnumber | nullrequired
Show properties
Any of:
number
number
null
null
judgeTypestringrequired
configobjectrequired
Show properties
expressionanyrequired
scoreTypestringrequired
outputsobject[]required

Exactly two outputs: first for a match, second for a miss

min items 2 · max items 2
Show properties
Array of object
Any of:
object
behaviorIdstringrequired

An existing label ID. The field name remains behaviorId.

min length 1
object
namestringrequired

Name of the label to create

min length 1
descriptionstringrequired

Description of the label to create

categoryIdsstring[]

Label category IDs from the same project as the judge

newVersionFromSourceobject

New version that copies sourceVersion and changes only the fields you set. Arrays replace.

Show properties
sourceVersionobjectrequired

Existing version to copy. Fields you omit keep its values.

Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
targetVersionobjectrequired
Show properties
majorintegerrequired
min 0 · max 9007199254740991
minorintegerrequired
min 0 · max 9007199254740991
promoteToProductionbooleanrequired

Whether the new version becomes the production version

advancedSettingsobject

Only the settings to change. Set online_evaluation_mode to 'on_demand' and promote to stop continuous scoring.

Show properties
online_environment_namesstring[] | null

null leaves on-demand evaluation unconfigured; online evaluation requires [] for All or selected names.

Show properties
Any of:
string[]
Array of string
string
null
null
online_evaluation_modestring

continuous checks new traces; on_demand checks only traces evaluations are requested on. Both apply environments, run conditions, and sampling.

Allowed:continuouson_demand
online_sampling_ratenumber

Percent of matching traces (or sessions, with session scoring on) scored, including evaluations requested on traces.

min 0 · max 100
online_span_triggersany | object
Show properties
Any of:
any
any
object
kindstringrequired
Allowed:andor
conditionsany[]required
online_session_scoringboolean
session_evaluation_count_enabledboolean | null
session_evaluation_idle_enabledboolean | null
session_evaluation_min_candidate_tracesnumber | null
session_evaluation_max_wait_minutesnumber | null
Show properties
Any of:
number
number
null
null
outputsobject[]

Categorical judges only. Replaces the complete output set. Changing outputs affects labels already applied and test-suite checks that expect them; check them first.

min items 2
Show properties
Array of object
Any of:
object
behaviorIdstringrequired

An existing label ID. The field name remains behaviorId.

min length 1
object
namestringrequired

Name of the label to create

min length 1
descriptionstringrequired

Description of the label to create

categoryIdsstring[]

Label category IDs from the same project as the judge

configobject

Only the fields to change, from the judge type's fields: prompt, description, reasoningLevel, minScore, maxScore for Agent judges; expression for deterministic judges. Code judges: omit to reuse the stored bundle; to upload new code, set bundleBase64, entrypointPath, and className.

Show properties
promptstring

Complete prompt for the new version

min length 1
descriptionstring | null

Description stored on the new version

reasoningLevelstring

Reasoning level for the new Agent judge version

Allowed:litenormalhigh
minScorenumber

Minimum numeric score for the new version

maxScorenumber

Maximum numeric score for the new version

bundleBase64string

Base64-encoded tar.gz bundle. Decoded size must be at most 1 MiB.

min length 1 · max length 1398104
entrypointPathstring

Path to the Python entrypoint inside the tar.gz bundle

min length 1
requirementsPathstring

Optional requirements file path inside the bundle

min length 1
classNamestring

Python scorer class name exported by the entrypoint

min length 1
scorerTypestring

Input format expected by the Code judge. Omit to keep the source version's.

Allowed:exampletrace
sdkVersioninteger

judgeval SDK major version targeted by the Code judge

max 9007199254740991
expressionany
Responses
200

Response for status 200

judge_idstringrequired
judge_version_idstring | nullrequired
implementation_idstring | nullrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.judgmentlabs.ai/v1/projects/YOUR_PROJECT_ID/judges/YOUR_JUDGE_ID' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'X-Organization-Id: YOUR_ORGANIZATION_ID' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "update": {
    "judgeDescription": "string",
    "newVersion": {
      "actionConfig": {
        "action_groups": [
          {
            "id": "string",
            "name": "string",
            "enabled": true,
            "environment_names": [
              "string"
            ],
            "when": {
              "kind": "any"
            },
            "frequency": {
              "count": 1,
              "window_seconds": 1
            },
            "cooldown_seconds": 0,
            "actions": [
              {
                "id": "string",
                "enabled": true,
                "type": "webhook",
                "config": {
                  "url": "string",
                  "secret": "string"
                }
              }
            ]
          }
        ]
      },
      "targetVersion": {
        "major": 0,
        "minor": 0
      },
      "promoteToProduction": true,
      "advancedSettings": {
        "online_environment_names": [
          "string"
        ],
        "online_evaluation_mode": "continuous",
        "online_sampling_rate": 0,
        "online_span_triggers": {},
        "online_session_scoring": true,
        "session_evaluation_count_enabled": true,
        "session_evaluation_idle_enabled": true,
        "session_evaluation_min_candidate_traces": 0,
        "session_evaluation_max_wait_minutes": 1
      },
      "judgeType": "prompt",
      "config": {
        "prompt": "string",
        "description": "string",
        "reasoningLevel": "lite",
        "minScore": 0,
        "maxScore": 0
      },
      "scoreType": "binary"
    },
    "newVersionFromSource": {
      "sourceVersion": {
        "major": 0,
        "minor": 0
      },
      "targetVersion": {
        "major": 0,
        "minor": 0
      },
      "promoteToProduction": true,
      "advancedSettings": {
        "online_environment_names": [
          "string"
        ],
        "online_evaluation_mode": "continuous",
        "online_sampling_rate": 0,
        "online_span_triggers": {},
        "online_session_scoring": true,
        "session_evaluation_count_enabled": true,
        "session_evaluation_idle_enabled": true,
        "session_evaluation_min_candidate_traces": 0,
        "session_evaluation_max_wait_minutes": 1
      },
      "outputs": [
        {
          "behaviorId": "string"
        },
        {
          "behaviorId": "string"
        }
      ],
      "config": {
        "prompt": "string",
        "description": "string",
        "reasoningLevel": "lite",
        "minScore": 0,
        "maxScore": 0,
        "bundleBase64": "string",
        "entrypointPath": "string",
        "requirementsPath": "string",
        "className": "string",
        "scorerType": "example",
        "sdkVersion": 1,
        "expression": null
      }
    }
  }
}'
Response
{
  "judge_id": "string",
  "judge_version_id": "string",
  "implementation_id": "string"
}

Was this page helpful?