Create a score
Records one evaluator result on a trace or a thread of the caller’s workspace. The value is checked against the pinned evaluator version’s output type and passed is derived from its pass rule. Scores are immutable: a second score for the same evaluator version, target and revision (and author, for human scores) is a 409 score_exists. A score from a local code evaluator must carry source_sha256, the hash of the pinned version’s source (409 source_mismatch otherwise). An experiment_item target takes a local code evaluator the experiment pinned, on an item that is done (the experiment completes when its last owed local score arrives), or a human label (source: human) from any evaluator on a done item; human labels feed the judge-vs-human agreement check and never count toward the run.
curl --request POST \
--url https://api.veri.studio/v1/scores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluator": "<string>",
"target_type": "<string>",
"evaluator_version": 123,
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"value": "<unknown>",
"reasoning": "<string>",
"status": "<string>",
"error": "<string>",
"source": "<string>",
"source_sha256": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/scores"
payload = {
"evaluator": "<string>",
"target_type": "<string>",
"evaluator_version": 123,
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"value": "<unknown>",
"reasoning": "<string>",
"status": "<string>",
"error": "<string>",
"source": "<string>",
"source_sha256": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evaluator: '<string>',
target_type: '<string>',
evaluator_version: 123,
request_id: '<string>',
deployment_id: '<string>',
thread_id: '<string>',
target_revision: '<string>',
value: '<unknown>',
reasoning: '<string>',
status: '<string>',
error: '<string>',
source: '<string>',
source_sha256: '<string>',
experiment_id: '<string>',
item_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/scores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"evaluator_id": "<string>",
"evaluator_version": 123,
"name": "<string>",
"target_type": "<string>",
"value": "<unknown>",
"source": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"experiment_id": "<string>",
"item_id": "<string>",
"passed": true,
"reasoning": "<string>",
"error": "<string>",
"author": "<string>",
"model_version_id": "<string>",
"monitor_id": "<string>",
"confidence": 123,
"probabilities": {}
}Authorizations
Body
Experiment-item targets: the experiment and the item
(<row_id>.<trial>, or <row_id>.<trial>.t<turn> for one turn of a
replayed thread). Outside the runner, only a local code evaluator the
experiment pinned takes scores, on an item that is done (see
GET /v1/experiments/{id}/items?pending_local=true), plus human labels
(source: human, any evaluator, a done item) that never count
toward the run.
Response
The stored score
One score.
curl --request POST \
--url https://api.veri.studio/v1/scores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluator": "<string>",
"target_type": "<string>",
"evaluator_version": 123,
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"value": "<unknown>",
"reasoning": "<string>",
"status": "<string>",
"error": "<string>",
"source": "<string>",
"source_sha256": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/scores"
payload = {
"evaluator": "<string>",
"target_type": "<string>",
"evaluator_version": 123,
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"value": "<unknown>",
"reasoning": "<string>",
"status": "<string>",
"error": "<string>",
"source": "<string>",
"source_sha256": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evaluator: '<string>',
target_type: '<string>',
evaluator_version: 123,
request_id: '<string>',
deployment_id: '<string>',
thread_id: '<string>',
target_revision: '<string>',
value: '<unknown>',
reasoning: '<string>',
status: '<string>',
error: '<string>',
source: '<string>',
source_sha256: '<string>',
experiment_id: '<string>',
item_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/scores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"evaluator_id": "<string>",
"evaluator_version": 123,
"name": "<string>",
"target_type": "<string>",
"value": "<unknown>",
"source": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"experiment_id": "<string>",
"item_id": "<string>",
"passed": true,
"reasoning": "<string>",
"error": "<string>",
"author": "<string>",
"model_version_id": "<string>",
"monitor_id": "<string>",
"confidence": 123,
"probabilities": {}
}
