Skip to content

Rescore a comparison eval run

POST
/v1/eval-runs/{runId}/rescore
curl --request POST \
--url https://example.com/v1/eval-runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rescore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "projectId": "example" }'

Starts a new comparison eval run of the same test set version, candidate and settings that replays nothing: it scores the run’s replays again, with the judgments recorded on them since (a changed answer judged on the replay itself; changes.new lists the items to judge). The run rescored stays as it was; the new one names it (comparison.rescoreOf, summary.rescoreOf). A case whose replays can’t be read again keeps its scores (rescored: false). Needs admin on the run’s suite and write on its project.

runId
required
string format: uuid

EvalRunId — opaque branded UUID.

Media typeapplication/json

Body of POST /v1/eval-runs/{runId}/rescore: optional.

object
projectId

The run’s project, needed only from a runtime that doesn’t record it on the run.

string
Examplegenerated
{
"projectId": "example"
}

The rescore started.

Media typeapplication/json
object
runId
required
string format: uuid
dryRunPreview
object
key
additional properties
any
Examplegenerated
{
"runId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"dryRunPreview": {}
}

bad-input: projectId is required (this runtime doesn’t record the run’s project), or isn’t a project here. dispatcher-input-invalid: this runtime can’t rescore (it doesn’t read replays and their judgments again).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

No eval run with that id under this tenant.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

eval-run-not-rescorable: only a completed comparison of a test set can be rescored.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}