Skip to content

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:

FormatOne line perDefault pathSchemaExample
conversationmodel answer.soup-loops/traces/*.jsonlsoup_cli/schemas/loop/conversation.schema.jsonsoup_cli/schemas/loop/examples/conversation.jsonl
feedbackfeedback action on one answer.soup-loops/feedback.jsonl.../feedback.schema.json.../examples/feedback.jsonl
paraphraseedited answer.soup-loops/paraphrases.jsonl.../paraphrase.schema.json.../examples/paraphrase.jsonl
iterationstep of one loop iteration.soup-loops/iterations.jsonl.../iteration.schema.json.../examples/iteration.jsonl
versionchange of the active version.soup-loops/versions.jsonl.../version.schema.json.../examples/version.jsonl
progressprogress event.soup-loops/progress.jsonl.../progress.schema.json.../examples/progress.jsonl

From Python, soup_cli.utils.loop_formats returns them:

python
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: 1 on every line. A conversation line without schema_version is 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 Z or +00:00, for example 2026-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_id is whatever key the client chose (up to 512 characters), and iteration_id is 1 to 128 letters, digits, ., _ or -, starting with a letter or digit, with no ..; soup loop writes iter-<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 example x_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, never 0 or 100.
  • source names the surface that wrote the line, as a lowercase name. Known values: soup-serve, soup-loop, and the surfaces of consuming applications playground, try_it, proxy.

conversation

One line per model answer. id is the answer's id: feedback refers to it.

FieldTypeMeaning
idUUIDThe answer. Required.
conversation_idstring or nullThe client's conversation key; the canary router hashes it, so one conversation stays in one bucket.
tstimeWhen the answer was completed. Required.
modelstringThe model as served: a soup serve model id or path, or an Ollama tag such as myproj:v2. Required.
versioninteger ≥ 1 or nullThe loop version that answered: 1 is the first deployed model, each promoted iteration adds 1.
adapterstring or nullThe adapter that produced the answer; null for the base model.
canary_bucketstable, canary or nullThe bucket the request was routed to; null when no canary split was active.
messagesarray of {role, content}What the model saw, oldest first, without the answer. Roles: system, developer, user, assistant, tool. Required.
responsestringThe answer text. Required.
finish_reasonstring or nullWhy generation stopped (stop, length; Ollama calls it done_reason).
latency_msnumber or nullRequest to completed answer.
tokens{prompt, completion}Token counts as the engine reported them, each an integer or null. Required.
optionsobjectGeneration parameters (temperature, top_p, max_tokens, ...).
sourcestringSee 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.

FieldTypeMeaning
idUUIDThis line. Required.
response_idUUIDThe conversation line's id. Required.
tstimeWhen the feedback was given. Required.
kindthumb, rating, edit, commentRequired.
valuesee belowthumb: 1 (up), -1 (down) or null (cleared). rating: an integer 1-5 or null (cleared). Not used by edit and comment.
edited_textstring or nulledit: the answer as the user corrected it; null withdraws an earlier edit. Required for edit.
commentstring or nullFree text; required for comment, optional next to any other kind.
user_refstring or nullAn opaque reference the application chose for the person (a single desktop user writes local). Soup stores no other author data.
sourcestringRequired.

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.

FieldTypeMeaning
response_idUUIDThe conversation line's id: the edited answer. Required.
prompt_hash64 lowercase hex charactersSHA-256 of the normalised prompt (below). Required.
paraphrasesarray of non-empty strings, at least 1Rewordings 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_attimeWhen the paraphrases were generated. Required.
droppedinteger ≥ 0Optional. How many generated paraphrases the generator's filters dropped.
dropped_reasonsarray of same_as_prompt, leaks_answerOptional. 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.

FieldTypeMeaning
iteration_idstringRequired.
parent_iteration_idstring or nullThe iteration whose version this one started from.
from_version / to_versioninteger ≥ 1 or nullThe version active at the start / the version this iteration produces.
started_attimeRequired.
finished_attime or nullSet when the outcome is final.
dataobject or nulluntil: 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).
datasetobject or nullpath, 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).
trainobject or nullmethod (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).
verdictobject or nulldecision: 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).
canaryobject or nulltraffic_pct (0-100), samples per bucket (stable, canary), verdict (OK, MAJOR, UNKNOWN while samples are too few), and an optional quality object (below).
artifactsobject or nullWhat serves this version again: adapter, merged, gguf paths, and served_as (the adapter name in soup serve, or an Ollama tag).
estimated_cost_usdnumber or nullThe budget gate's estimate.
outcomeenumrunning, canary, promoted, rolled_back (the canary was withdrawn), skipped (nothing to train, or no verdict), failed (a stage errored). Required.
reasonstring or nullWhy, 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:

FieldTypeMeaning
verdictenumOK (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 ≥ 0Answers that received feedback, per bucket.
negative{stable, canary}, integers ≥ 0Rated answers with negative feedback, per bucket.
share{stable, canary}, each a number in [0, 1] or nullnegative / rated; null while a bucket has no rated answers.
differencenumber in [-1, 1] or nullCanary share minus stable share.
znumber or nullPooled two-proportion z statistic; positive means the canary is worse. null when it is undefined.
p_valuenumber in [0, 1] or nullOne-sided p-value of z.
min_ratedinteger ≥ 1Rated answers needed in each bucket before the verdict is anything but UNKNOWN or INSUFFICIENT.
thresholdnumber in [0, 1]The tolerated rise in the negative share (0.05 = 5 percentage points).
timed_outbooleanTrue when the maximum wait ran out before min_rated was reached.
decided_onenumerrors_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 fieldTypeMeaning
fixed, broken, tiesintegers ≥ 0Edits by the rule above.
n_editsinteger ≥ 0The edits checked: fixed + broken + ties.
n_paraphrasesinteger ≥ 0The paraphrases used, summed over the edits.
p_valuenumber in [0, 1] or nullOne-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.
scoringobjectHow a hit was decided (below).
outcomeenumpass, 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 fieldTypeMeaning
better, worse, tiesintegers ≥ 0Held-out edits the new version scored higher on, lower on, or the same as the old version.
ninteger ≥ 0The held-out edits scored: better + worse + ties.
p_valuenumber in [0, 1] or nullOne-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.
scoringobjectThe same shape as in corrections. Required.
outcomeenumpass (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).
styleobjectOptional, 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_recall scores 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 least threshold (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_judge asks a judge model to compare the answer with the corrected text; template names 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.

FieldTypeMeaning
idUUIDRequired.
tstimeWhen the switch took effect. Required.
from_versioninteger ≥ 1 or nullnull only for initial. Required.
to_versioninteger ≥ 1Required.
causeinitial, promote, rollbackRequired.
actorloop or userThe automatic cycle, or a person. Required.
iteration_idstring or nullThe iteration that produced to_version (promote) or whose canary was withdrawn (rollback).
served_asstring or nullThe name to_version is served under.
aliasstring or nullA moving name that now points at to_version (for example the Ollama model myproj).
reasonstring or null
sourcestring

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.

FieldTypeMeaning
iteration_idstring or nullnull for a job run outside an iteration. Required (may be null).
tstimeRequired.
stagelowercase nameOpen vocabulary. soup loop: harvest, train, verdict, deploy, canary, promote, rollback. A consuming application: data, merge, train, ship, export, deploy. Required.
eventstart, progress, end, errorRequired.
done / totalinteger or nullnull when the stage cannot count.
messagestring or nullShort status text for a person.
errorstring or nullA short code on error (soup ship writes execution_aborted).
job_idstring or nullThe producer's job id, to link a job log.
phase, side, suite, repeatForwarded 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:

OutcomeWhen
canaryThe adapter was trained, passed the check and its canary started (to_version is the version it will take if promoted; finished_at is null).
promotedA later cycle promoted the canary; to_version is now a version.
rolled_backThe 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.
skippedA 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.
failedThe training run died, or the deploy was attempted and refused.

A version line is written only when the active version changes:

LinecauseactorWritten by
The first versioninitialusersoup loop init --pre-wired
The first version of a loop whose init wrote noneinitialloopthe first watch cycle (also the first soup loop rollback of a loop.yaml from before the log)
A canary became productionpromoteloopthe watch daemon
Production went backrollbackusersoup 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.