Skip to main content
Offline eval sends a dataset to the platform. The platform scores each example with the verifier stored on that example, then returns an experiment summary. Callers cannot submit a score. The key owner must be that expert’s creator. These paths do not require X-Profy-End-User-Id. Every JSON response is { code, message, data }. For the TypeScript client see TypeScript SDK. To run one turn yourself, bind it with metadata.profy_eval on Invoke an Expert.
A dataset is a list of examples. Each example has an input, attachments, reference outputs, and its own tests/test.sh. After the platform finishes, the experiment leaves running and the summary carries the mean reward and pass rates.

Dataset file

Any dataset.json in the uploaded files is a dataset root, at any directory depth. When it has examples, the platform expands it into one task per example. Paths are relative to the directory that contains that dataset.json.
id matches /^[\w.-]+$/ and is unique in the file. input means the same as inputs, and evaluator means the same as evaluators. Every referenced path must be in the same upload. A path that starts with that example’s id/ is stored without that prefix, so the task root is the example and the grader stays at tests/test.sh. A missing file, a duplicate id, or an empty examples array returns 400. A dataset.json without examples that already has the single-task shape is still imported as one task.

Upload a dataset

string
default:"seed"
One of seed, online, boundary, regression. The platform stamps this onto every task.
string
Append into a dataset this expert already owns. Letters, digits, _, and - only. A foreign id returns 409 with message DATASET_ID_MISMATCH.
object[]
required
At least one item. Each item has path, content, and optional encoding (utf8 or base64). Use utf8 for text and base64 for attachments.
datasetRef is what later run and read calls use.

List tasks

string
Return only tasks in this suite.
string
A datasetRef, such as upload:customs-bench. Omit it to read the expert’s current dataset. An unknown ref returns 404.
Each item in data.tasks has id, name, and suite. Reference outputs and the verifier are not included. Read one task’s inputs:
data.files is a list of { path, size }. tests/, solution/, and instruction.md are omitted. Download one file:
The body is the file bytes, with Content-Type: application/octet-stream.

Run the whole dataset

string
required
The ref returned by upload. A ref this expert does not own returns 404.
string
required
Text model id. An unavailable model returns 400 with message MODEL_UNAVAILABLE.
integer
required
Repeats per example, from 1 to 5. An empty dataset returns 400 with message DATASET_EMPTY.
The experiment is still running when this returns. Poll the read endpoint below until experiment.status is no longer running.

Record an experiment only

When you run each turn yourself through Invoke an Expert, create the experiment first, then send metadata.profy_eval on every call.
string
required
open or chat.
string[]
required
At least one suite name.
integer
required
From 1 to 10.
integer
Optional.
string
At most 120 characters.
string
code, skill, or experience.
string
An existing experiment to compare against.
This call only creates the record. It does not start runs. After a turn finishes:
The body is { "task": "d526", "trial": 1 }. A session that is still generating returns 409.

Read metrics

data.experiment is the experiment row. data.summary is the aggregate. List every experiment with GET .../eval/experiments. There, data is an array of { experiment, summary }. Per trial:
Each row has id, task, trial, status, evaluationStatus, reward, durationMs, inputTokens, outputTokens, credits, and sessionId. Compare with a baseline:
base is required. data.summary.current and data.summary.baseline are the two summaries. data.metrics is the check delta. data.tasks lines runs up by task. Experiments that belong to different experts return 400.

Next

TypeScript SDK

datasets.create and experiments.evaluate

Invoke an Expert

metadata.profy_eval