Loop data formats
soup loop, soup serve and any application built on them pass data through six append-only JSONL logs. This page is for whoever writes or reads those files: it lists the fields and the rules. The formats are version 1 since v0.78.0 and did not change in v0.78.1.
Each format has a JSON Schema (Draft 2020-12) and an example file inside the installed package:
| Format | One line per | Default path | Schema | Example |
|---|---|---|---|---|
| conversation | model answer | .soup-loops/traces/*.jsonl | soup_cli/schemas/loop/conversation.schema.json | soup_cli/schemas/loop/examples/conversation.jsonl |
| feedback | feedback action on one answer | .soup-loops/feedback.jsonl | .../feedback.schema.json | .../examples/feedback.jsonl |
| paraphrase | edited answer | .soup-loops/paraphrases.jsonl | .../paraphrase.schema.json | .../examples/paraphrase.jsonl |
| iteration | step of one loop iteration | .soup-loops/iterations.jsonl | .../iteration.schema.json | .../examples/iteration.jsonl |
| version | change of the active version | .soup-loops/versions.jsonl | .../version.schema.json | .../examples/version.jsonl |
| progress | progress event | .soup-loops/progress.jsonl | .../progress.schema.json | .../examples/progress.jsonl |
From Python, soup_cli.utils.loop_formats returns them:
from soup_cli.utils.loop_formats import FORMATS, load_schema, load_examples, prompt_hash
print(FORMATS)
schema = load_schema("feedback")jsonschema is not a dependency of Soup; install it to validate lines yourself. Run one active loop per project: the files take no lock, and two soup loop watch processes on one .soup/loop.yaml would both change the version counter. Other programs may append to the same files.
Rules shared by every format
- JSONL, append only. One JSON object per line, UTF-8. A change is a new line; a writer never edits or deletes an earlier line.
schema_version: 1on every line. A conversation line withoutschema_versionis version 0 (see conversation), and no other format has a version 0: Soup's paraphrase reader skips such a line and its feedback reader takes it as version 1, so write the field on every line; a reader that meets a higher version it does not know skips the line.- Time is ISO 8601 in UTC with the suffix
Zor+00:00, for example2026-11-05T11:00:00+00:00. A reader skips (and counts, with a warning) a line whose time is more than 24 hours ahead of now: one such line would be the newest time and the loop's data cursor would never move past it. A line up to a day ahead (a client clock that runs fast) is read. - Ids (
id,response_id) are UUIDs in canonical lowercase form. Two exceptions:conversation_idis whatever key the client chose (up to 512 characters), anditeration_idis 1 to 128 letters, digits,.,_or-, starting with a letter or digit, with no..;soup loopwritesiter-<UTC YYYYMMDDTHHMMSS>-<8 hex>, which sorts in time order. - Unknown fields are ignored by readers. New optional fields can appear without a new
schema_version. - Extensions: a field named
x_<app>(for examplex_zero) belongs to the application that wrote it. It must hold a JSON object. Soup never reads, rewrites or depends on it. - No invented numbers. A count, latency or progress total that was not measured is
null, never0or100. sourcenames the surface that wrote the line, as a lowercase name. Known values:soup-serve,soup-loop, and the surfaces of consuming applicationsplayground,try_it,proxy.
conversation
One line per model answer. id is the answer's id: feedback refers to it.
| Field | Type | Meaning |
|---|---|---|
id | UUID | The answer. Required. |
conversation_id | string or null | The client's conversation key; the canary router hashes it, so one conversation stays in one bucket. |
ts | time | When the answer was completed. Required. |
model | string | The model as served: a soup serve model id or path, or an Ollama tag such as myproj:v2. Required. |
version | integer ≥ 1 or null | The loop version that answered: 1 is the first deployed model, each promoted iteration adds 1. |
adapter | string or null | The adapter that produced the answer; null for the base model. |
canary_bucket | stable, canary or null | The bucket the request was routed to; null when no canary split was active. |
messages | array of {role, content} | What the model saw, oldest first, without the answer. Roles: system, developer, user, assistant, tool. Required. |
response | string | The answer text. Required. |
finish_reason | string or null | Why generation stopped (stop, length; Ollama calls it done_reason). |
latency_ms | number or null | Request to completed answer. |
tokens | {prompt, completion} | Token counts as the engine reported them, each an integer or null. Required. |
options | object | Generation parameters (temperature, top_p, max_tokens, ...). |
source | string | See the shared rules. Required. |
Secrets (hf_..., sk-..., Bearer ... shapes) are redacted by the writer before the line reaches disk, as soup serve --trace-log already does.
Version 0 is the line soup serve --trace-log wrote before it moved to version 1: {"ts": <epoch seconds>, "prompt": <last user message>, "response": ..., "latency_ms": ..., "tokens": <completion tokens>}. It has no id, so feedback cannot point at it. Readers that accept version 0 read prompt as a single user message.
feedback
One line per feedback action on one answer.
| Field | Type | Meaning |
|---|---|---|
id | UUID | This line. Required. |
response_id | UUID | The conversation line's id. Required. |
ts | time | When the feedback was given. Required. |
kind | thumb, rating, edit, comment | Required. |
value | see below | thumb: 1 (up), -1 (down) or null (cleared). rating: an integer 1-5 or null (cleared). Not used by edit and comment. |
edited_text | string or null | edit: the answer as the user corrected it; null withdraws an earlier edit. Required for edit. |
comment | string or null | Free text; required for comment, optional next to any other kind. |
user_ref | string or null | An opaque reference the application chose for the person (a single desktop user writes local). Soup stores no other author data. |
source | string | Required. |
Which line counts. For thumb, rating and edit, the latest line per (response_id, kind) wins: file order within one file, ts when a reader merges files. comment lines accumulate; every one counts.
paraphrase
One line per edited answer: stable paraphrases of the prompt of an answer a person corrected. The loop and a desktop app that drives it use them to check whether a new model version learned the correction (the version is asked the paraphrases, not the original prompt). They are generated once per answer and reused, so every version is checked against the same questions. They are never training data.
| Field | Type | Meaning |
|---|---|---|
response_id | UUID | The conversation line's id: the edited answer. Required. |
prompt_hash | 64 lowercase hex characters | SHA-256 of the normalised prompt (below). Required. |
paraphrases | array of non-empty strings, at least 1 | Rewordings of the prompt. Required. |
generator | {model, template: {id, version}} | The model that wrote the paraphrases and the instruction template it was given, all non-empty strings. Required. |
created_at | time | When the paraphrases were generated. Required. |
dropped | integer ≥ 0 | Optional. How many generated paraphrases the generator's filters dropped. |
dropped_reasons | array of same_as_prompt, leaks_answer | Optional. Why paraphrases were dropped. |
prompt_hash is the lowercase SHA-256 hex digest of the normalised prompt: the conversation line's messages (the prompt without the answer), serialised as JSON with sorted keys and no extra whitespace (json.dumps(messages, sort_keys=True, separators=(",", ":"), ensure_ascii=False) in Python), encoded as UTF-8. Non-ASCII characters are written as themselves, not as \uXXXX escapes. Nothing is trimmed, case-folded or reordered. soup_cli.utils.loop_formats.prompt_hash(messages) computes it; a reader recomputes it to see whether the prompt of the answer is still the one that was paraphrased.
Which line counts. The last line per response_id wins (file order). A writer that regenerates the paraphrases (a new template version, say) appends a new line.
What the generator drops. It rejects a paraphrase that normalises to the original prompt (same_as_prompt) or contains at least half of the words the correction added (leaks_answer), regenerates once, and drops it if it fails again. paraphrases can therefore hold fewer items than were requested, but never none: if nothing survives, no line is written.
iteration
A snapshot of one harvest → train → verdict → canary iteration. A writer appends a line each time the iteration advances (running → canary → promoted); the latest line per iteration_id wins. The canary verdict arrives long after training ends, which is why an iteration is not a single line.
| Field | Type | Meaning |
|---|---|---|
iteration_id | string | Required. |
parent_iteration_id | string or null | The iteration whose version this one started from. |
from_version / to_version | integer ≥ 1 or null | The version active at the start / the version this iteration produces. |
started_at | time | Required. |
finished_at | time or null | Set when the outcome is final. |
data | object or null | until: the cursor (conversation and feedback lines up to and including this time were read; the next iteration reads only newer ones); conversations; feedback counts per kind (thumb_up, thumb_down, rating, edit, comment). |
dataset | object or null | path, sha256, dpo_pairs, kto_rows, sft_rows (row counts of the three datasets a harvest builds), graduated (edits that moved from the held-out set into training in this iteration: an edit whose prompt hash puts it in the held-out 30% is kept aside for exactly its first iteration, then trained on). |
train | object or null | method (dpo, kto, ...), run_id, base (what training actually loaded: a base model id or a merged earlier version), root_base (the original base model id when base is a merged version). |
verdict | object or null | decision: SHIP or DON'T SHIP (from soup ship), or SKIPPED / ERROR when no verdict was reached; method: ship or eval_gate; gate: optional, loop-v2 when soup ship --gate loop-v2 made the decision (absent = the plain verdict); baseline: {kind: base or version, ref, version}, what the candidate was compared against (version is required when kind is version); path of the report; reason; and the optional evidence objects corrections and held_out (below). |
canary | object or null | traffic_pct (0-100), samples per bucket (stable, canary), verdict (OK, MAJOR, UNKNOWN while samples are too few), and an optional quality object (below). |
artifacts | object or null | What serves this version again: adapter, merged, gguf paths, and served_as (the adapter name in soup serve, or an Ollama tag). |
estimated_cost_usd | number or null | The budget gate's estimate. |
outcome | enum | running, canary, promoted, rolled_back (the canary was withdrawn), skipped (nothing to train, or no verdict), failed (a stage errored). Required. |
reason | string or null | Why, in plain words. |
canary.quality is optional (omit it when nothing judged answer quality; a line without it stays valid) and carries the evidence behind the answer-quality verdict. When it is present, all of its fields are present:
| Field | Type | Meaning |
|---|---|---|
verdict | enum | OK (no significant regression was found, which is not the same as proven equal), MAJOR, UNKNOWN (a bucket is still below min_rated) or INSUFFICIENT. INSUFFICIENT means the maximum wait ran out below the minimum. |
rated | {stable, canary}, integers ≥ 0 | Answers that received feedback, per bucket. |
negative | {stable, canary}, integers ≥ 0 | Rated answers with negative feedback, per bucket. |
share | {stable, canary}, each a number in [0, 1] or null | negative / rated; null while a bucket has no rated answers. |
difference | number in [-1, 1] or null | Canary share minus stable share. |
z | number or null | Pooled two-proportion z statistic; positive means the canary is worse. null when it is undefined. |
p_value | number in [0, 1] or null | One-sided p-value of z. |
min_rated | integer ≥ 1 | Rated answers needed in each bucket before the verdict is anything but UNKNOWN or INSUFFICIENT. |
threshold | number in [0, 1] | The tolerated rise in the negative share (0.05 = 5 percentage points). |
timed_out | boolean | True when the maximum wait ran out before min_rated was reached. |
decided_on | enum | errors_and_quality, or errors_only when the rollout was decided on the error rates alone. |
verdict.corrections (check 1, corrections learned) and verdict.held_out (check 2, non-inferiority on held-out edits) are optional and independent: absent means that check was not measured, and a line without them stays valid. When one is present, all of its fields are present.
An edit is fixed when the new version's hits on its paraphrases (see paraphrase) exceed the old version's, broken when they are lower, and a tie otherwise; n_edits counts the edits. A hit is decided by scoring (below).
corrections field | Type | Meaning |
|---|---|---|
fixed, broken, ties | integers ≥ 0 | Edits by the rule above. |
n_edits | integer ≥ 0 | The edits checked: fixed + broken + ties. |
n_paraphrases | integer ≥ 0 | The paraphrases used, summed over the edits. |
p_value | number in [0, 1] or null | One-sided sign test over fixed vs broken: the chance of at least this many fixed if fixing and breaking were equally likely. null when fixed + broken is 0. |
scoring | object | How a hit was decided (below). |
outcome | enum | pass, fail, insufficient (the iteration had edits but fewer than 5 discordant ones, fixed + broken) or not_applicable (the training set held no edits, for example a thumbs-only loop, so there were no corrections to check; promotion is then decided by the canary's ratings). |
held_out checks that learning the corrections did not cost anything else. The held-out edits are edits kept out of training; they are scored with the same metric against their corrected text and paired by prompt. Non-inferiority means the new version is not significantly below the old one on that metric.
held_out field | Type | Meaning |
|---|---|---|
better, worse, ties | integers ≥ 0 | Held-out edits the new version scored higher on, lower on, or the same as the old version. |
n | integer ≥ 0 | The held-out edits scored: better + worse + ties. |
p_value | number in [0, 1] or null | One-sided sign test over worse vs better: the chance of at least this many worse if the two versions were equally good. null when better + worse is 0. |
scoring | object | The same shape as in corrections. Required. |
outcome | enum | pass (not significantly below the old version), fail (significantly below), weak (fewer than 10 held-out edits: too few to trust a pass) or not_measured (fewer than 5 held-out edits). |
style | object | Optional, information only: preferred_new, preferred_old, n (integers ≥ 0) and p_value (number in [0, 1] or null) of the pairwise style comparison. It is recorded but never part of the outcome. |
scoring (in both objects) is {method, threshold, template}, all three present: method is added_recall or reference_judge; threshold is a number in [0, 1] or null; template is {id, version} or null.
added_recallscores what the correction added. The added words are the edit's content words that the original answer lacked, and an answer is a hit when at leastthreshold(0.5) of them are present in it. When an edit adds fewer than 2 content words, all of its content words are used instead.reference_judgeasks a judge model to compare the answer with the corrected text;templatenames the judge's instruction template.
The first model is a seed line: parent_iteration_id and from_version null, to_version: 1, outcome: promoted, reason: "initial deploy", and a matching initial line in the version log.
version
One line each time the active version changes. The active version is the to_version of the last line. A rollback after an iteration finished (for example a person going back from v2 to v1 the next day) is a line here, not a change to the iteration.
| Field | Type | Meaning |
|---|---|---|
id | UUID | Required. |
ts | time | When the switch took effect. Required. |
from_version | integer ≥ 1 or null | null only for initial. Required. |
to_version | integer ≥ 1 | Required. |
cause | initial, promote, rollback | Required. |
actor | loop or user | The automatic cycle, or a person. Required. |
iteration_id | string or null | The iteration that produced to_version (promote) or whose canary was withdrawn (rollback). |
served_as | string or null | The name to_version is served under. |
alias | string or null | A moving name that now points at to_version (for example the Ollama model myproj). |
reason | string or null | |
source | string |
progress
One line per progress event. The shape is that of soup ship --progress jsonl (event, done, total, and phase / side / suite / repeat while a verdict runs) plus ts, iteration_id and stage. Lines carry no prompts, answers or user data.
| Field | Type | Meaning |
|---|---|---|
iteration_id | string or null | null for a job run outside an iteration. Required (may be null). |
ts | time | Required. |
stage | lowercase name | Open vocabulary. soup loop: harvest, train, verdict, deploy, canary, promote, rollback. A consuming application: data, merge, train, ship, export, deploy. Required. |
event | start, progress, end, error | Required. |
done / total | integer or null | null when the stage cannot count. |
message | string or null | Short status text for a person. |
error | string or null | A short code on error (soup ship writes execution_aborted). |
job_id | string or null | The producer's job id, to link a job log. |
phase, side, suite, repeat | Forwarded from soup ship --progress jsonl. |
Who writes each file
soup serve --trace-log writes conversation lines (without the options field) and soup serve --feedback-log writes feedback lines. soup loop writes iterations.jsonl, versions.jsonl, progress.jsonl and, before it trains, paraphrases.jsonl. It decides from .soup/loop.yaml, and it reads its own logs in two places: when soup loop watch starts it compares versions.jsonl and iterations.jsonl with loop.yaml and can apply a promotion that loop.yaml does not hold, and the verdict check of a rollout reads the newest iteration line of the adapter. So a line another program appends to those two files can change what the loop does.
A line is one JSON object in UTF-8 without a BOM, written by a single append. If the file ends in a line another writer left unfinished, a newline is written first. A path outside the project directory, a symlink, a junction or a hard link in the way is refused. A line that cannot be written is a warning and a note on the iteration, and never stops the loop.
An iteration line is appended when the iteration is recorded and again when its outcome changes:
| Outcome | When |
|---|---|
canary | The adapter was trained, passed the check and its canary started (to_version is the version it will take if promoted; finished_at is null). |
promoted | A later cycle promoted the canary; to_version is now a version. |
rolled_back | The canary was withdrawn by a regression, by --canary-on-timeout rollback, by soup loop rollback, or because soup loop canary replaced it. to_version becomes null. |
skipped | A candidate was trained and not deployed: a DON'T SHIP verdict (verdict.decision says so), no verdict reached (ERROR or SKIPPED), or a deploy that was not attempted (no serve endpoint). A poll with nothing to train is not an iteration and writes no line; soup loop status shows it as last_idle_poll. |
failed | The training run died, or the deploy was attempted and refused. |
A version line is written only when the active version changes:
| Line | cause | actor | Written by |
|---|---|---|---|
| The first version | initial | user | soup loop init --pre-wired |
| The first version of a loop whose init wrote none | initial | loop | the first watch cycle (also the first soup loop rollback of a loop.yaml from before the log) |
| A canary became production | promote | loop | the watch daemon |
| Production went back | rollback | user | soup loop rollback |
A canary that is withdrawn leaves production where it was, and soup loop canary writes no version line either. A version number is never reused after a rollback: v1, v2, back to v1, then the next promotion is v3.
See also
Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.