API reference

API reference · API

Replace a test suite

PUT/v1/evals/{id}API key

Chat scope. The whole suite; its revision moves when the cases changed, and evidence from an older revision stops routing until the suite runs again.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe suite id (ev_...).

Request body

application/json, required

Request body fields
FieldTypeWhat it is
namerequiredstring
pass_thresholdnumberThe weighted share of cases a model must pass to route, 0 to 1. 0.9 unless set.
casesrequiredarray of object
cases[].namestring
cases[].promptstring
cases[].systemstring
cases[].messagesarray of object
cases[].messages[].rolestringOne of "system", "user", "assistant".
cases[].messages[].contentstring
cases[].max_tokensinteger
cases[].temperaturenumber
cases[].response_formatobject
cases[].checkrequiredobjectHow the answer is graded: one of exact, contains, regex, json_schema, number. exact compares the trimmed answer (ignore_case optional); contains needs every string in value; regex tests pattern with flags from i, m and s on a linear time engine (RE2), which refuses lookaround and backreferences, and is never run on an answer over 10000 characters; json_schema parses the answer as JSON and holds it to schema with the strict JSON engine; number reads the last number in the answer and allows tolerance, absolute or, with relative, a share of value. There is no model graded check.
cases[].check.typerequiredstringOne of "exact", "contains", "regex", "json_schema", "number".
cases[].check.valueany
cases[].check.ignore_caseboolean
cases[].check.patternstring
cases[].check.flagsstring
cases[].check.schemaobject
cases[].check.tolerancenumber
cases[].check.relativeboolean
cases[].weightnumber
scheduleobject or nullweekly: true checks the suite once a week and runs it again, inside budget_micros, only when the cases changed, a tested price moved, or a cheaper untested model arrived. The weekly run is a request of the key that last saved the suite (or of the account, when the dashboard saved it), checked again each week.
schedule.weeklyboolean
schedule.budget_microsinteger

Example

{
  "name": "string",
  "pass_threshold": 0,
  "cases": [
    {
      "prompt": "Say hello in five words.",
      "check": {
        "type": "exact"
      }
    }
  ],
  "schedule": {
    "weekly": false,
    "budget_micros": 0
  }
}

Answer 200

The suite.

Fields of the 200 answer
FieldTypeWhat it is
idstring
object"eval"
namestring
pass_thresholdnumber
revisionintegerMoves whenever the cases change; evidence from another revision is not routed on.
case_countinteger
route_modelstringThe model id that routes on this suite: antimatter/auto:suite/<id>.
scheduleobject or null
schedule.weeklyboolean
schedule.budget_microsinteger
schedule.last_checked_atinteger or null
schedule.paid_bystringkey: each weekly run is the request of the key that last saved the suite. account: the dashboard saved it, and the personal account pays. One of "key", "account".
schedule.stoppedstring or nullWhy the schedule stopped (the key that pays for it was revoked, expired or lost the chat scope). Saving the suite again resumes it.
created_atinteger
updated_atinteger
casesarray of object
cases[].namestring
cases[].promptstring
cases[].systemstring
cases[].messagesarray of object
cases[].messages[].rolestringOne of "system", "user", "assistant".
cases[].messages[].contentstring
cases[].max_tokensinteger
cases[].temperaturenumber
cases[].response_formatobject
cases[].checkrequiredobjectHow the answer is graded: one of exact, contains, regex, json_schema, number. exact compares the trimmed answer (ignore_case optional); contains needs every string in value; regex tests pattern with flags from i, m and s on a linear time engine (RE2), which refuses lookaround and backreferences, and is never run on an answer over 10000 characters; json_schema parses the answer as JSON and holds it to schema with the strict JSON engine; number reads the last number in the answer and allows tolerance, absolute or, with relative, a share of value. There is no model graded check.
cases[].check.typerequiredstringOne of "exact", "contains", "regex", "json_schema", "number".
cases[].check.valueany
cases[].check.ignore_caseboolean
cases[].check.patternstring
cases[].check.flagsstring
cases[].check.schemaobject
cases[].check.tolerancenumber
cases[].check.relativeboolean
cases[].weightnumber
routeobjectWhat the route would choose now: the models whose latest complete run passed, cheapest first at today's billed card applied to their mean tokens per case, and the models left out with why. A request carries the first 3 as its chain.
route.modelstring
route.pickstring or null
route.passingarray of object
route.excludedarray of object
evidencearray of object
suggestionsarray of objectReasons to run again: never_run, cases_changed, prices_changed (with models), new_models (cheaper priced text models the last run never tried).
suggestions[].reasonstring
last_runobject or null
active_runobject or null

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 403OpenAI shaped error.
  • 404OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter