Send eval results

Create a run on an existing eval from results scored outside Statsig. Each result carries its input, output, optional expected value and categories, and one…

Create a run on an existing eval from results scored outside Statsig. Each result carries its input, output, optional expected value and categories, and one or more named scores from 0 to 1.

posthttps://statsigapi.net/console/v1/evals/send_results/{name}

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Path parameters

namestringrequired

name

Body

application/json
namestring

The name of the eval run

Example:My Eval Run
Constraints:nullable
resultsobject[]required

Results with input, expected, output and score fields, up to 10,000 per request. Statsig stores latencyMs, inputTokens and outputTokens without scoring them, and List Eval Run Result Rows returns them.

Example:[{"input":"Foo","expected":"Hi Foo","output":"Hi Foo","category":["greeting"],"scores":{"correctness":{"score":1,"metadata":{"justification":"friendly"}},"tone":{"score":1}}}]
Show child attributes
inputstringrequired
expectedstring
outputstringrequired
categoryoneOf
Constraints:string[]string
rowIDstring

Stable id of the case this result belongs to, so runs line up row by row. With dataset, required and one of its row ids. Otherwise defaults to the position in results.

traceIDstring

Trace that produced the output, when known.

spanIDstring
latencyMsnumber

Milliseconds the output took to generate.

Constraints:min: 0
inputTokensnumber

Input tokens used to generate the output. When you send only one of inputTokens and outputTokens, Statsig stores the other as 0.

Constraints:min: 0
outputTokensnumber

Tokens in the output.

Constraints:min: 0
scoresobjectrequired
datasetstring

Name or id of the eval dataset the results were produced from. Runs on the same dataset are compared row by row.

Example:dataset1
Constraints:min length: 1
parametersobject

Parameters

Example:{"parameter_name":"parameter_value"}
summaryScoresobject

Summary scores

Example:{"summary_score_name":100}
primaryGraderstring

Score name shown as the primary result. Defaults to the first score.

criticalGradersstring[]

Score names treated as release gates: a mean of 0 fails the whole run.

Response

application/json
200· Send eval results
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
idstringrequired
namestringrequired
evalIDstringrequired
statusstringrequired

running until the run finishes, then completed, or failed when the run recorded an error.

Allowed values:runningcompletedfailed
createdTimenumberrequired
Constraints:format: double
finishTimenumberrequired
Constraints:format: doublenullable
runTimenumberrequired
Constraints:format: doublenullable
datasetIDstringrequired

Dataset the run scored. Null for runs posted from code through send_results.

Constraints:nullable
datasetItemCountnumberrequired
Constraints:format: double
graderIDsstring[]required
primaryEvalGraderIDstringrequired
Constraints:nullable
parametersobjectrequired
Constraints:nullable
errorReasonstringrequired
Constraints:nullable
400· Invalid request. Please check the request input and try again.
statusintegerrequired
Allowed values:400
messagestringrequired
403· Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
statusintegerrequired
Allowed values:403
messagestringrequired
404· Not Found. The requested resource could not be found.
statusintegerrequired
Allowed values:404
messagestringrequired

Was this helpful?

For AI agents: a documentation index is available at /llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.