- the document revision;
- the judgment version;
- the engine and its version;
- the context hash, a hash of the compiled context, the judgment version and the engine version;
- the raw output;
- the time;
- the status.
settles answer for revision 12 of payment pay_881:
settles reads other documents, so its evaluation also records what it read. See what a judgment with relations records.
Brussle keeps each evaluation, with its compiled context, until you delete its namespace, and storage pricing includes this history (except replays).
Read evaluations
- For one document.
GET /namespaces/{ns}/documents/{id}?include=historyreturns the evaluations of the document’s current incarnation, newest first. The SDKs take a flag for each part ofincludeinstead:ns.get(id, include_history=True, include_context=True, include_raw=True)in Python, andns.get(id, { includeHistory: true, includeContext: true, includeRaw: true })in TypeScript. Addall_incarnations=trueto get the earlier lives of the sameidtoo, andhistory_limitto limit the length of the list. - One evaluation by its id.
GET /namespaces/{ns}/evaluations/{id}returns one evaluation, such as the one an answer’sevaluation_idnames, and both SDKs call it withns.evaluation(id). It finds the evaluation in any document, incarnation or judgment (shadow evaluations included). The response hascontext,rawandlatency_ms:- A replay has no
contextof its own, because it shares the context of itsreplay_of. - A reuse has no
rawand nocontextof its own; it shares the context of itsengine_answer_from. - A failed evaluation has no
raw, and a failure recorded after the retries ran out has nocontexteither. latency_msis the time that the engine request took, without retries. It is absent on evaluations recorded before Brussle measured it.
- A replay has no
- Export. You can export evaluation history on Scale. The export holds each evaluation in a time range, with its context and the outcomes joined to it, as files you download.
Read the fields
model_idis the model the provider’s response named, exactly as the provider sent it. It isnullwhen the response named no model, and on a failure that got no response. A reuse names the model of the evaluation it reuses.outputholds the engine’s raw numbers, and each has the same meaning as in the answer it made:bool:p.choice:value,distandescape_p.score:scoreanddist.- A composite judgment:
parts, thepof each part. Brussle combines the parts intopwhen it reads the answer.
contextis the exact compiled context that the engine saw. Addinclude=history,contextto get it.- It is keyed by path (such as
state.description), and values fromstateare JSON as you wrote them. - Images appear only at image paths:
images.<name>,previous.images.<name>,images.<name>in a relation’srecords, and a relation’slatest(images.<name>). A list stays a list. Each image is a reference and never the image’s bytes, whichGET /namespaces/{ns}/images/{digest}returns. An image that the engine read is the reference that the document holds, such as{"digest": "sha256:...", "type": "image/jpeg", "width": 1440, "height": 960}. An image that the engine did not read is{"digest": "sha256:...", "omitted": "engine_reads_no_images"}or"omitted": "over_the_limit", or"omitted": "erased"when you erased the image before this judging. - The evaluations that name an image keep its reference after you erase it, and a read adds
"erased": trueto that reference. The image’s bytes are gone, soGET /namespaces/{ns}/images/{digest}returnsimage_erased.
- It is keyed by path (such as
rawis the engine’s answer to this judgment only, in the shape ofoutput; addinclude=history,rawto get it. It never has the answers to other judgments or the engine’s token counts (the size that matters to you iscontext_tokens).- Brussle leaves out
contextandrawby default. context_truncatedis true when Brussle cut the context to fitmax_tokensor the engine’s limit, or left out images withover_the_limit. An engine that reads no images, or an image that you erased, does not make it true.relations_cappedis true when a relation stopped before it checked each matching document, so the relation may be missing one. A blocking relation is also capped when more candidates qualified than itslast_n, and the right candidate may be one that it did not read.cappedinrelationsnames the relation. The judgment’s stats give the share of the day’s evaluations that were capped asrelations_capped_rate, besidetruncation_rate.shadow: truemarks an evaluation from an activation’s shadow report. A shadow evaluation never makes an answer, and Brussle does not bill its judging, but it counts toward storage like other evaluations.replay_ofnames the evaluation whose stored context a replay judged again. Brussle replays to fit the correction again after the engine’s behaviour changes, and after you activate a version on another engine. You cannot start a replay, and a replay never makes an answer. Brussle does not bill a replay after the engine’s behaviour changes, while a replay after you move to another engine is billed as judging.replay_ofisnullon all other evaluations.
When an evaluation fails
An evaluation withstatus: "failed" has error: {class, message}, where the class is retryable or terminal. The answer reads failed and keeps its last good numbers.
- Brussle retries a
retryablefailure with backoff, and then each hour. - Brussle does not retry a
terminalfailure. The next write to the document judges it again, and so can a backfill, aperiodicrun or a change to a related document.
failed until you write the document again.
- The failure is caused by the document. For example, the engine refused the document or could not read it (the output was not valid or could not be parsed, the document was too large, or the content was refused). This failure is terminal at once.
- The engine kept failing. A server error, a timeout, a lost connection or a rate limit went on after the retries with backoff, so the evaluation has class
retryableand Brussle retries the document each hour. Brussle makes the failureterminalif it is still failing on a retry made 24 hours or more after the document last changed.
pending (never failed), however long the outage lasts. A held retry is not an attempt, so the 24-hour rule cannot make an answer terminal while Brussle holds it. Brussle judges all the held documents when the engine recovers.
- Documents that failed before Brussle stopped the calls stay
failed. - At low traffic, too few calls can fail for Brussle to stop the calls, so the usual retry rules above apply.
GET /enginesshows the latest health check of each engine version, inprobe.status.
- Run a backfill of the judgment. It skips the documents whose answer for the active version and current revision already succeeded, and judges the others.
- A new write to a document also starts a new attempt.
terminal, and the answer keeps its last good value:
- A
jsonvalue that does not satisfy the column’sschema.error.messagenames the path and the reason (such asschema: /amount: expected number, got string), andrawholds the engine’s text. - A
jsonvalue of more than 64 KiB, with a message that starts withtoo_large:. - An embedding of the wrong length, or with a number that is not finite.
max_chars is not a failure: Brussle cuts it and the answer says truncated: true.
Context too large. Brussle cuts a context once to 80% of the limit when the engine refuses it as too large. The limit is the lower of the recipe’s max_tokens and the engine’s limit. If the engine still does not take the context, the evaluation fails terminal with a message that starts with too_large:. Lower the recipe’s max_tokens, or send fewer fields.
What a judgment with relations records
A judgment with relations reads other documents too, and its evaluation records what it read, so an outcome or an audit can see exactly what the engine read after those documents have changed.watermarksays how far into the namespace’s writes Brussle had read when it read the context.answers_generation, next towatermark, says how far the context had read the answers of other judgments and the changes to blocks.related_documentslists each related document that the context read, rendered or aggregated, as{relation, document_id, revision}. The list is part of the context, so you get it withinclude=history,contextand fromGET /namespaces/{ns}/evaluations/{id}.
related_documents entry can have these fields:
evaluations, when the context read the answers of that document, names the evaluation behind each answer by judgment, such as{"frustrated": "ev_…"}. Brussle keeps evaluations until you delete the namespace, so you can always follow a roll-up back to the answers that it read.fits, when the context read apthrough a fit of a judgment with features, names the fit of each such judgment, such as{"invoice_settlement": "fit_…"}. A fit change moves a child’spwith no new evaluation, sofits, with the child’s stored enginepand features, gives you the exact value that the reader read. It is absent when the context read each answer as the engine gave it.outcomes, when the context read the outcomes of that document, names the outcome that the context read for each judgment, such as{"refunded": "oc_…"}, as of the evaluation’swatermark. Brussle keeps outcomes until you delete the namespace.
upstreamhas one entry for each judgment whose answers the context read when a document that it read was not up to date, in which case the context showed the last answer. An entry looks like{"judgment": "frustrated", "state": "child_pending"}.child_pendingmeans that the document had work waiting. This judgment judges again if the document’s new answer changes what a relation shows, so wait for it; you do not have to act.child_out_of_scopemeans that the document had no work waiting and will not catch up without help, because it failed for a cause of its own or no answer is coming. Its next write, or a backfill of that judgment, makes it catch up.- The entries record what this evaluation saw (never the current status of that judgment), and they stay with the evaluation.
upstreamis empty when each answer that the context read was fresh.
relationsholds, for each relation by name, the counts at the time of the evaluation:scanned: the related documents read.qualified: of those, the documents insidewindowthat amatchon answers admitted. Whencappedis true for a blocking relation, more documents qualified than the relation read, soqualifiedis a lower bound.selected: the documents left afterlast_n.rendered: the records that the context held.dropped: the records left out to fit the token limit.clipped: the fields cut by amax_chars.tokens: the relation’s own share of the context.range_full: true when more documents matched than the newest 1,000 that the relation reads.walk_exhausted: true when amatchon answers or outcomes found fewer thanlast_nqualifying documents among the newest 1,000, and more documents matched. In older evaluations it meant that the match read its former limit of 4 ×last_n.capped: true when the relation may be missing a matching document. Its entry in the context showscappedorrange_full. A blocking relation is capped when more candidates qualified than itslast_n.
relation_shared_tokenscounts the rest of the context (the document’s own fields, thepreviousrendering if there is one, and the JSON around them).- Brussle records no evaluation when a compile used the previous answer again, and adds the counts to the judgment’s daily totals instead.
features, for aboolwith features, holds the raw value of each feature as this evaluation read it, in 64 bits, and leaves out a missing feature. Brussle never calculates these values again, so an age is the age at the judged revision andprevious.pis the engine’s previouspwhen this evaluation was made. An older evaluation of a composite judgment has the features inoutput.featuresinstead.previous_revision, for a recipe withprevious, is the revision that the previous rendering came from.first_revision: trueappears in place ofprevious_revisionwhen nothing was shown underprevious, for example on the first evaluation of a document, or of anidthat was created again. The stored context holds both renderings.
Reuses
A reuse is the evaluation of a change that moved only a judgment’s features. What the engine reads stays the same, so a reuse keeps the engine’s answer inoutput, with the new features, and makes no engine call. A reuse follows one of these changes, on a judgment with or without relations:
- a write to a value that is a feature, which the engine does not read;
- with relations, a change that moves only an aggregate that the engine does not read;
-
with an age feature, a new revision of the judged document, even with the same content, because its ages are measured from the new revision’s
updated_at. -
engine_answer_fromnames the evaluation that made that engine answer, which is never another reuse. The reuse shares its context. -
observed_atis the time of the newest write that the reuse read: the judged document’s own write or, for a judgment with relations, the newest write to it or to a related document. -
A reuse keeps
previous.pfrom the answer that it replaces and recalculates every other feature. - A reuse is a new answer, so outcomes join to it like to any other answer. It is not billed.
-
aborted: truemarks a reuse whose answer never landed, and calibration leaves it out. -
An export, and a replay by Brussle, read the context of a reuse through
engine_answer_from.
The context hash
The context hash covers three things: the compiled context, the judgment version and the engine version that the judgment names. For a judgment on an engine version that is not pinned, such asjev current, that engine version is current, so a change in the engine’s behaviour does not change the hash.
- Brussle uses the previous answer again, with no engine call and no new evaluation, when a change to a document leaves a judgment’s context the same. The answer’s
evaluation_idandengine_versionthen still name the earlier evaluation, made for an earlier revision. - The answer is a reuse if the context stays the same but the judgment’s features moved, and Brussle records it as Reuses describes.