VocalDocscontracts 1.65.0

Run an evaluation suite

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

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

Runs the suite's scenarios, or those scenario_ids names, against the candidate and the baseline as a prompt.evaluation job, and answers 202 with the run queued, its job_id and its Location (1.55.0; prompt-manager.md section 9.1). Each scenario repeats as the suite says, as a test Call with purpose: "evaluation" on the headless Engine. A request whose suite revision, candidate, baseline and scenarios equal those of a run still queued or running answers that run. Until a dedicated evaluation quota exists the Calls count against the daily allowance of test Calls (429 test_daily_cap_reached); from 1.63.0 they count against both, the evaluation quota refusing with 429 evaluation_quota_reached, and a run with model_families runs each scenario once per family. Until the headless Engine runs evaluation Calls the request is refused with 422 capability_not_available and the detail evaluation_engine_not_available. The job emits job.succeeded or job.failed, and a completed run prompt_evaluation.completed.

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_.../runs" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "candidate": {
      "agent_version": 1
    }
  }'

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: PromptEvalRunCreateRequest.

FieldTypeRequiredDescription
baselinePromptEvalBaselineInput or PromptEvalBaselineChoicenoA version, active or none; active when omitted. A choice rather than null, so a client that dumps unset fields as null cannot drop the baseline by accident.
candidatePromptEvalCandidateInputyes
model_familiesarray of ModelFamilynoThe model families to evaluate (1.56.0; prompt-manager.md section 5 rule 3), each a model_family of an llm descriptor the candidate's chain reaches (prompt_eval_model_family_unreachable otherwise); the family of the chain's primary when omitted. From 1.63.0 each scenario and repetition runs once per family named.
repetitionsintegernoThe suite's repetitions when omitted.
scenario_idsarray of PromptEvalScenarioIdnoThe scenarios to run; every scenario of the suite when omitted.

Responses

StatusContent typeShapeError codes
202application/jsonPromptEvalRun
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeprompt_eval_suite_archived, idempotency_in_progress, idempotency_key_reused, agent_version_unavailable
422application/jsonErrorEnvelopevalidation_failed, capability_not_available
429application/jsonErrorEnvelopetest_daily_cap_reached, evaluation_quota_reached, rate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 202 answer

The shape is PromptEvalRun.

FieldTypeRequiredDescription
advisorybooleanyesTrue when the judged results gate nothing, because the judge is not checked against human labels (section 9.1 rule 5); true for every run of 1.55.0. From 1.63.0 false only when the suite's latest calibration met its target with the run's judge (promptEvalJudgeAdvisory), and false for a run that judged nothing.
agent_idAgentIdyes
baselinePromptEvalRunTarget or nullyes
by_familyarray or nullnoOne entry per evaluated family and arm (1.63.0), once completed; null before. Absent from an api before 1.63.0.
by_itemarray or nullnoOne entry per scenario, rubric item and arm (1.63.0), once completed; null before. Absent from an api before 1.63.0.
candidatePromptEvalRunTargetyes
cost_linesarray of PromptEvalCostLineyes
created_atTimestampyes
created_byActorRefyes
error_codestring or nullyes
finished_atTimestamp or nullyes
gatePromptEvalGateOutcome or nullnoHow the run fares against its suite's publish gate (1.63.0), once completed; null for a suite with no gate and before completion. Absent from an api before 1.63.0.
idPromptEvalRunIdyes
job_idJobIdyesThe prompt.evaluation job that runs it.
judgeStageRef or nullyesThe judge the run used; null with none.
model_familiesarray of ModelFamilynoThe model families the run evaluated (1.63.0): the request's model_families, or the family of the chain's primary. Absent from an api before 1.63.0.
object"prompt_eval_run"yes
repetitionsintegeryes
scenario_countintegeryes
started_atTimestamp or nullyes
statusPromptEvalRunStatusyes
suite_idPromptEvalSuiteIdyes
suite_revisionintegeryes
summaryarray or nullyesOne entry per arm, the candidate first, once completed; null before.