VocalDocscontracts 1.65.0

Calibrate a suite's judge

POST /v1/prompt-eval-suites/{prompt_eval_suite_id}/calibrations

PropertyValue
Operationcreate_prompt_eval_calibration
GroupPrompt evaluations and experiments
Scopeprompts:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited evaluations.prompt_eval_calibration.create (mutation)
Released in1.63.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Creates a calibration of the suite's current judge and answers 201 with it (1.63.0; prompt-manager.md section 9.1 rule 5): from run_id, a sample drawn at random from the completed run's simulated verdicts that kept their transcript, labelling until every entry is labelled; from from_calibration_id, the labelled sample of an earlier calibration, queued at once as a prompt.calibration job. The job judges each labelled transcript again and compares the judge with the labels; a completed calibration becomes the suite's calibration record, and its judged results stop being advisory once a record meets the target (0.9 agreement on at least 30 must items, targets) with the judge that produced them. The judge's tokens count against the evaluation quota (429 evaluation_quota_reached). Every issue is a detail of 422 validation_failed (PromptEvalCalibrationIssueCode).

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the prompts:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/prompt-eval-suites/pes_.../calibrations" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
prompt_eval_suite_idpathPromptEvalSuiteIdyesThe id of an evaluation suite: pes_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: PromptEvalCalibrationCreateRequest.

FieldTypeRequiredDescription
from_calibration_idPromptEvalCalibrationIdnoAn earlier calibration of the suite whose sample is fully labelled, reused with its labels; the new calibration queues at once.
run_idPromptEvalRunIdnoA completed run of the suite to sample; exactly one of it and from_calibration_id.
sample_sizeintegerno50 when omitted (a target); fewer when the run holds fewer.

Responses

StatusContent typeShapeError codes
201application/jsonPromptEvalCalibration
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeprompt_eval_suite_archived, idempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnvelopeevaluation_quota_reached, rate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 201 answer

The shape is PromptEvalCalibration.

FieldTypeRequiredDescription
agreementPromptEvalAgreement or nullyesNull until completed.
cost_linesarray of PromptEvalCostLineyes
created_atTimestampyes
created_byActorRefyes
error_codestring or nullyes
finished_atTimestamp or nullyes
from_calibration_idPromptEvalCalibrationId or nullyesThe calibration whose labelled sample this one reuses; null when it drew its own.
idPromptEvalCalibrationIdyes
job_idJobId or nullyesThe prompt.calibration job that compares; null while labelling.
judgeStageRefyes
labelledintegeryesThe entries that carry a label.
meets_targetboolean or nullyesWhether the agreement met the target (calibrationMeetsTarget); null until completed.
object"prompt_eval_calibration"yes
run_idPromptEvalRunIdyesThe run the sample was drawn from.
samplearray of PromptEvalCalibrationEntryyes
started_atTimestamp or nullyes
statusPromptEvalCalibrationStatusyes
suite_idPromptEvalSuiteIdyes
suite_revisionintegeryes
targetPromptEvalCalibrationTargetyes