Skip to main content

Nova API — /api/evals

The operations Nova tags public under /api/evals. Generated from reference-src/nova-openapi.json.

PUT /api/evals/{id}​

Operation id eval_update: in Python client.call("eval_update", …), on the command line stardelt api eval_update.

PUT /api/evals/{id} — correct a question or its known answer, 200 with the row.

Correct one eval's question and known answer in place; the runs of GET /api/evals/{id}/runs stay. Both fields are required and are checked exactly as POST /api/catalog/evals checks them. Only a member of its owner group or an administrator may correct it; the catalog and the owner group do not change.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe eval's id

Request body

FieldTypeRequiredDefaultDescriptionConstraints
expectedanyYesThe known answer, in the same three shapes NewEval takes.
questionstringYesThe question, 1 to 500 characters.

Responses

CodeDescription
200The updated row
400The question or the expected answer is not in the accepted shape
401Not signed in
403Only a member of the owner group or an administrator may correct an eval
404No such eval, or the id is not a number
503The state store is not configured

DELETE /api/evals/{id}​

Operation id eval_delete: in Python client.call("eval_delete", …), on the command line stardelt api eval_delete.

DELETE /api/evals/{id} — 204; 404 when the id is not a row.

Remove one eval. Only a member of its owner group or an administrator may delete it; the eval was stored, never executed.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe eval's id

Responses

CodeDescription
204Deleted
401Not signed in
403Only a member of the owner group or an administrator may delete an eval
404No such eval, or the id is not a number
503The state store is not configured

GET /api/evals/{id}/runs​

Operation id eval_run_list: in Python client.call("eval_run_list", …), on the command line stardelt api eval_run_list.

GET /api/evals/{id}/runs — the eval's runs, newest first.

The runs of one eval — one posted answer and its verdict each — newest first. ?limit= is 1 to 100, 20 by default. Reading a run is reading the eval's history, so the route needs a session like the rest of the API; it answers 404 for an id that is not an eval. Without a state store the route answers 503.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe eval's id
limitquerystringNoHow many runs, 1 to 100 (default 20)

Responses

CodeDescription
200The eval's runs, newest first
400limit is not a number from 1 to 100
401Not signed in
404No such eval, or the id is not a number
503The state store is not configured

POST /api/evals/{id}/runs​

Operation id eval_run_create: in Python client.call("eval_run_create", …), on the command line stardelt api eval_run_create.

POST /api/evals/{id}/runs — compare one answer and store the verdict, 201 with the row.

Post one answer to an eval — the SQL an agent wrote, the rows it returned, or the runner's own error — and store the verdict: Nova compares it with the eval's expected here, never sends the rows to a model. value passes for one row of one equal cell (numbers by value); rows passes when the two tables are equal as a multiset; uses passes when the SQL names every expected namespace.table; an error fails with its sentence. Only a member of the eval's owner group or an administrator may post one; the caller is recorded as createdBy. The reason sentences are the page's text.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe eval's id

Request body

FieldTypeRequiredDefaultDescriptionConstraints
endpointstring (nullable)NoThe model endpoint that answered, at most 200 characters.
errorstring (nullable)NoThe runner's own failure (Ask refused, the statement errored), at most 2 000 characters.
modelstring (nullable)NoThe model that wrote the answer, at most 200 characters.
rowsarray of array (nullable)NoThe rows the statement returned: 1 to 100 rows of 1 to 50 scalars.
sqlstring (nullable)NoThe statement an agent wrote, at most 20 000 characters.
tokensinteger (nullable)NoThe tokens the model call used; not negative.format int64

Responses

CodeDescription
201The stored run and its verdict
400The answer is over one of the limits
401Not signed in
403Only a member of the owner group or an administrator may run an eval
404No such eval, or the id is not a number
503The state store is not configured