Skip to content
Context docs
Evals API

Judges

Serverhttps://context.example.com/api/v1/evals

A judge is an LLM judge in the organization's library: instructions, a model and an output type (FLOAT for a 1 to 5 score, BOOLEAN for pass or fail, TEXT for a free-form answer). Scorecards and monitors use judges. SYSTEM judges are built in, shared by every organization and can't be changed; USER judges belong to one organization.


List judges

GET
https://context.example.com/api/v1/evals
/judges
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

Returns the organization's judges and the shared SYSTEM judges, SYSTEM judges first and each group newest first, each with the number of scorecards that use it.

List judges › Responses

Successful response

​object[]

Judges visible to the organization

An LLM-as-judge evaluator configuration
id
​string · minLength: 1 · required

Unique judge identifier

orgId
​string | null · minLength: 1 · required

Organization that owns this judge (null for SYSTEM judges)

createdById
​string | null · minLength: 1 · required

User who created this judge

name
​string · minLength: 1 · maxLength: 100 · required

Judge display name

description
​string | null · maxLength: 1000 · required

Optional judge description

instructions
​string · minLength: 1 · maxLength: 10000 · required

Evaluation criteria for the judge: what to assess. The system builds the full prompt, with the trace input and output, when the judge runs.

outputType
​string · enum · required

How the judge outputs its evaluation

Enum values:
FLOAT
BOOLEAN
TEXT
model
​string · minLength: 1 · required

Model the judge uses for evaluation

type
​string · enum · required

Whether this is a system-provided or user-created judge

Enum values:
SYSTEM
USER
​object | null · required

A FLOAT judge's rating-scale captions, keyed by scale point; null shows the bare numbers (always null for BOOLEAN and TEXT)

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp

scorecardCount
​integer · min: 0

Number of scorecards that use this judge


Create a judge

POST
https://context.example.com/api/v1/evals
/judges
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

An LLM judge in the organization's library, for scorecards and monitors.

Create a judge › Headers

Idempotency-Key
​string · maxLength: 255

A key you choose for this request (a UUID works; at most 255 characters; a blank one is refused 400, code idempotency_key_empty). A retry with the same key and the same body answers the first success again instead of acting twice; kept 24 hours. Send one on every create and run start you might retry.

Create a judge › Request Body

Input for creating a new judge
name
​string · minLength: 1 · maxLength: 100 · required

Judge display name

instructions
​string · minLength: 1 · maxLength: 10000 · required

Evaluation criteria -- what the judge should assess

description
​string · maxLength: 1000

Optional description

outputType
​string · enum

Output format

Enum values:
FLOAT
BOOLEAN
TEXT
Default: FLOAT
model
​string · minLength: 1

Provider-prefixed LLM model to use; omitted records this deployment's small model

​object

FLOAT only: captions for the rating scale's points; omitted shows the bare numbers

Create a judge › Responses

Success. A retry with the same Idempotency-Key and the same request answers this again, with Idempotent-Replayed: true.

An LLM-as-judge evaluator configuration
id
​string · minLength: 1 · required

Unique judge identifier

orgId
​string | null · minLength: 1 · required

Organization that owns this judge (null for SYSTEM judges)

createdById
​string | null · minLength: 1 · required

User who created this judge

name
​string · minLength: 1 · maxLength: 100 · required

Judge display name

description
​string | null · maxLength: 1000 · required

Optional judge description

instructions
​string · minLength: 1 · maxLength: 10000 · required

Evaluation criteria for the judge: what to assess. The system builds the full prompt, with the trace input and output, when the judge runs.

outputType
​string · enum · required

How the judge outputs its evaluation

Enum values:
FLOAT
BOOLEAN
TEXT
model
​string · minLength: 1 · required

Model the judge uses for evaluation

type
​string · enum · required

Whether this is a system-provided or user-created judge

Enum values:
SYSTEM
USER
​object | null · required

A FLOAT judge's rating-scale captions, keyed by scale point; null shows the bare numbers (always null for BOOLEAN and TEXT)

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp

scorecardCount
​integer · min: 0

Number of scorecards that use this judge


Get a judge

GET
https://context.example.com/api/v1/evals
/judges/{judgeId}
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

Returns one judge: its instructions, model, output type and the number of scorecards that use it. A SYSTEM judge is readable from every organization; another organization's judge answers 404.

Get a judge › path Parameters

judgeId
​string · minLength: 1 · required

Judge identifier

Judge identifier

Get a judge › Responses

Successful response

An LLM-as-judge evaluator configuration
id
​string · minLength: 1 · required

Unique judge identifier

orgId
​string | null · minLength: 1 · required

Organization that owns this judge (null for SYSTEM judges)

createdById
​string | null · minLength: 1 · required

User who created this judge

name
​string · minLength: 1 · maxLength: 100 · required

Judge display name

description
​string | null · maxLength: 1000 · required

Optional judge description

instructions
​string · minLength: 1 · maxLength: 10000 · required

Evaluation criteria for the judge: what to assess. The system builds the full prompt, with the trace input and output, when the judge runs.

outputType
​string · enum · required

How the judge outputs its evaluation

Enum values:
FLOAT
BOOLEAN
TEXT
model
​string · minLength: 1 · required

Model the judge uses for evaluation

type
​string · enum · required

Whether this is a system-provided or user-created judge

Enum values:
SYSTEM
USER
​object | null · required

A FLOAT judge's rating-scale captions, keyed by scale point; null shows the bare numbers (always null for BOOLEAN and TEXT)

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp

scorecardCount
​integer · min: 0

Number of scorecards that use this judge


Edit a judge

PATCH
https://context.example.com/api/v1/evals
/judges/{judgeId}
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

Changes only the fields you send.

Edit a judge › path Parameters

judgeId
​string · minLength: 1 · required

Judge identifier

Judge (from the path)

Edit a judge › Request Body

Input for updating an existing judge
name
​string · minLength: 1 · maxLength: 100

New name

description
​string | null · maxLength: 1000

New description

instructions
​string · minLength: 1 · maxLength: 10000

New evaluation criteria

outputType
​string · enum

New output format

Enum values:
FLOAT
BOOLEAN
TEXT
model
​string

New LLM model

​object | null

FLOAT only: new rating-scale captions (null clears them; omit to leave unchanged). Changing outputType away from FLOAT clears them

Edit a judge › Responses

Success

An LLM-as-judge evaluator configuration
id
​string · minLength: 1 · required

Unique judge identifier

orgId
​string | null · minLength: 1 · required

Organization that owns this judge (null for SYSTEM judges)

createdById
​string | null · minLength: 1 · required

User who created this judge

name
​string · minLength: 1 · maxLength: 100 · required

Judge display name

description
​string | null · maxLength: 1000 · required

Optional judge description

instructions
​string · minLength: 1 · maxLength: 10000 · required

Evaluation criteria for the judge: what to assess. The system builds the full prompt, with the trace input and output, when the judge runs.

outputType
​string · enum · required

How the judge outputs its evaluation

Enum values:
FLOAT
BOOLEAN
TEXT
model
​string · minLength: 1 · required

Model the judge uses for evaluation

type
​string · enum · required

Whether this is a system-provided or user-created judge

Enum values:
SYSTEM
USER
​object | null · required

A FLOAT judge's rating-scale captions, keyed by scale point; null shows the bare numbers (always null for BOOLEAN and TEXT)

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp

scorecardCount
​integer · min: 0

Number of scorecards that use this judge