Curation sessions
A session is a raw conversation dataset that you upload. A curation has a model judge each conversation and registers the examples it keeps as a version of a training dataset.
Upload a session
To upload conversations, run the following command:
akka optimize training sessions create -f conversations.jsonl --source oasst1
The -f option is required and does not read standard input. The --source option must be oasst1, otel or canonical. Each format has one record per line:
| Source | Format |
|---|---|
|
The OASST1 message-trees JSONL export, one tree per line. Each prompter and assistant pair becomes a candidate, without a system prompt. |
|
The OTLP JSON logs export from an OpenTelemetry Collector file exporter, one batch per line. |
|
Captured model calls in JSONL. Records whose |
Keep the session hash printed by the command. You need it to start curation; there is no session list command.
Start a curation
To start a curation, follow these steps:
-
Save the following request as
curation.yaml, replacingSESSION_HASHwith the hash from the upload.curationId: triage-curation-1 sessionHashes: - SESSION_HASH source: oasst1 threshold: 0.7 dataset: triage/curated systemPrompt: "You are a concise general-purpose assistant. Answer directly and accurately, show reasoning briefly when the question calls for it, and say plainly when you do not know." -
Apply the request:
akka optimize training curations apply -f curation.yaml --wait --exit-status
Use -f - to read the request from standard input. Without --wait, follow progress with akka optimize training curations wait ID.
The request accepts the following fields:
| Field | Meaning |
|---|---|
|
Optional ID. If omitted, Optimize generates |
|
Required list of uploaded session hashes. |
|
Required source format: |
|
Language filter for |
|
Optional judging instruction. |
|
Minimum score to keep a candidate, from 0 to 1. Defaults to |
|
Required system prompt for examples without their own system prompt. |
|
Required registry dataset name, such as |
In a custom judgeInstruction, keep the following sentence. Optimize does not check for it.
Respond ONLY with a JSON object of the form {"score": <number 0.0-1.0>, "ok": <true|false>}.
Starting again with the same ID and parameters reuses the curation.
Follow a curation
The phases are EXTRACTING, JUDGING, BUILDING_DATASET, WRITING_ARTIFACTS, COMPLETED and FAILED. Only JUDGING reports progress, as judged candidates out of extracted candidates.
The following example shows wait output. Your IDs and counts differ.
akka optimize training curations wait triage-curation-1 --timeout 30m --exit-status
Curation triage-curation-1
Threshold 0.70
Extracting
Judging ████████████░░░░░░░░░░░░ 50% 600/1200 candidates
Building dataset
Writing artifacts
Completed
Curation triage-curation-1
Phase Completed
Judged 1200 of 1200 extracted
Mean score 0.7412, keeping 0.70 and above
Kept 812 candidate(s)
Dataset triage/curated:v1
Judge dataset triage/curated-judge:v1
Press Control+C to stop watching. The curation continues.
Read the record with get. Use the whole ID, not a prefix. Keep the ID; there is no command to list curations.
akka optimize training curations get triage-curation-1 -o json
Use get -o json to read the counts, mean score, registered datasets, skip reasons, and any failure reason.
Check Unscored and Skipped before comparing mean scores. Unscored candidates do not contribute to the mean.
The JSON skips map counts candidates by reason:
| Source | Reasons |
|---|---|
|
|
|
|
|
|
Registered datasets
Candidates that score at or above threshold become a new version of dataset, with one chat example per line. Each example contains system, user and assistant messages. A candidate’s own system prompt takes precedence over systemPrompt.
Every scored candidate also goes into <dataset>-judge, shown as judgeDataset. Unscored candidates go into neither dataset. If no candidate is kept, no version of the training dataset is registered. Content that the registry already holds adds no version.
For evaluation of free-text answers, use a model: or http: grader. The json-label-match grader does not score prose. See Graders and rewards.
Curate inside a pipeline
A curate stage takes the same request fields. A later stage names its output as @<stage> where it names a dataset. See The curate stage.