Skip to main content
An answer is the cell of an AI column: it tells you a judgment’s value for one document, whether that is still current, and exactly what made it: the document revision, the judgment version, the engine version and, once your outcomes support one, the fit that corrected its number. An answer is data, so you can query it like any other field. You get answers inside documents and query rows, each under the name of its judgment. Here is a payment’s answer for settles, a choice among the open invoices it could settle:
Say you then activate version 4 of settles, which asks differently. The same answer reads like this until Brussle judges the payment again (some fields left out):

What you can rely on

  • Each answer names what made it: the document revision it is for, the judgment_version, the engine and engine_version, the model_id, and the evaluation_id. That evaluation is the permanent record of the judging, and it keeps the context the engine read.
  • model_id is the provider’s own name for the model that answered, exactly as its response gave it, such as a dated snapshot. It is null when the response named no model, and absent until an evaluation succeeds. engine_version is Brussle’s record of the engine’s behaviour (its epoch). The two can differ: a provider can change behaviour under one model name, or serve a new name for the same behaviour.
  • Each answer has a freshness. An answer is fresh when it agrees with the document’s current revision, the documents it reads and the judgment’s active version. A stale answer gives its cause in stale_reason, and a stale or failed answer keeps its last good numbers along with the revision they are for.
  • Old and new versions do not mix. An answer from an earlier version of the judgment reads stale (with stale_reason older_version) until Brussle judges it again. A version that changes only thresholds does not count, and a new engine epoch never makes an answer stale. See versions.
  • An unchanged context reuses the answer. Brussle reuses the answer for the new revision, with no engine call, when a write leaves the compiled context the same. revision moves on, while evaluation_id and evaluated_at still name the evaluation that made the numbers.
  • thresholds holds each of the judgment’s current thresholds, which Brussle evaluates when you read the answer.
  • A judgment with applies_to has no answer for the documents it does not apply to.

The numbers in an answer

The numbers below are a decision column’s: a judgment of type bool, choice or score. A text, json or embedding answer has none of them (see answers with a value and no number). An answer’s numbers are the engine’s own output, except on a judgment with features or a composite (below). They are p for a bool; value, dist and escape_p for a choice; and score and dist for a score. Brussle keeps these numbers to about seven significant digits and returns each as the shortest decimal that stands for it. An engine’s 0.01 reads 0.01, never 0.009999999776482582. Thresholds, query filters and threshold recommendations compare that decimal, so an answer that shows 0.01 meets a threshold of 0.01 everywhere.

The corrected number

Only a decision column’s answers carry a corrected number. On a judgment that has no features and is not a composite, each answer also carries a calibrated object once the judgment has enough outcomes. The object holds the engine’s number corrected to what happened in your data. It appears when a fit uses at least 50 outcomes, with at least 15 of each kind (the minimums), and beats the engine’s numbers on outcomes it did not see. Below 100 outcomes, the fit has to beat them by more than one standard error. Until then the answer leaves calibrated out (it is never null). See the correction.
  • The corrected numbers have the fields of the answer’s type: p for a bool; value, dist and escape_p for a choice (its value is the most probable option of the corrected dist); score and dist for a score.
  • interval is the 95% interval of the corrected p, escape_p or score, so it tells you how sure the corrected number is. Automate on its bounds, never on the number alone. A fit made before fits recorded intervals has interval null until the next nightly fit. See how sure a corrected number is.
  • stage is early on 50 to 999 outcomes and full from 1,000. outcomes is how many outcomes the fit uses.
  • prior, on an early fit, says what the correction starts from: identity (the engine’s own numbers) or pool (a template’s pooled fit). Its weight is the share that comes from your own outcomes. See below 100 outcomes.
  • fit, run and pinned name the fit, the calibration run the answer was read with, and whether that fit is pinned. GET .../calibration/fits/{fit} returns the fit’s map, so you can reproduce each corrected number from the engine’s. On a template’s tenant with a fit of its own, fit names the template’s fit that the tenant’s fit is blended with (see per-customer corrections).
  • from_previous_epoch: true means the engine changed, so the answer reads the previous epoch’s fit until the new epoch has its own. See when the engine changes.
  • extrapolated: true means the engine’s value is outside the range the fit was made on, so the corrected number is a guess. Post outcomes for documents like this one.
calibrated never replaces the engine’s fields, and thresholds, filters, ranking, subscriptions, relations and groups all read the engine’s numbers. calibrated is there for you to read. See which number your thresholds and queries read.

Answers with a value and no number

A text, json or embedding answer carries value and the common fields, and never p, dist, score, escape_p, thresholds or calibrated. Its judgment’s calibration reads mode: not_applicable.
  • A text answer holds at most the definition’s max_chars characters. truncated is true when the text was cut there or the engine stopped at its output limit, and a cut text is still a successful answer.
  • A json answer holds the engine’s value. With a schema, it is an object that satisfies the schema. A value that does not is a failed evaluation whose error.message names the first rule it breaks, such as schema: /amount: expected number, got string, and the answer keeps its last good value.
  • An embedding answer holds exactly dimensions numbers, each the shortest decimal that stands for the stored value, so a vector reads back as it was stored.
  • No value appears on an answer that has never succeeded, as with numbers.

Answers with one set of numbers

A judgment with features and a composite have no calibrated object. Their answer’s own numbers are the ones to act on, and every reader uses them.

A judgment with features

A feature is a number that a judgment keeps beside its answer: a count from its related documents, a number on the document, an age, or the engine’s previous p. See what a feature can read.
  • features holds each feature’s raw value, or null when it is missing. Features are 64-bit, so counts and whole numbers are exact up to 2^53 and a decimal amount is the nearest double.
  • Brussle fits the answer’s numbers on every read of the answer, from the engine’s answer and the features. The fitted numbers are p on a bool; dist, escape_p and value on a choice; and dist and score on a score. A choice’s value is the most probable option of the fitted dist, so a fit can change the pick. No fit applies before 100 outcomes.
  • raw is the engine’s own answer: {p}, {dist, value, escape_p} or {dist, score}. Its meaning never changes.
  • fit names the fit, or is null while the numbers are the engine’s. It has id, fitted_at, outcomes, run, pinned, from_previous_epoch and method. method is features when the fit reads the features beside the engine’s answer, and early or full when it corrects the engine’s number alone (an early fit also has prior).
  • fit.interval is the 95% interval of p, escape_p or score. Filter and rank on its bounds with answers.<j>.interval.lower and .upper.
  • fit.tenant: true means a template’s tenant reads a fit of its own (on Team or Scale), so id and outcomes are the tenant’s. See each tenant grows its own correction.
  • candidate_features holds each candidate’s numbers, by candidate id and feature name, as the evaluation read them. It appears on a choice among candidates that keeps numbers about each candidate.
Thresholds, filters, ranking, subscriptions, links and the judgments that read this answer all use the fitted numbers, so a new fit can move a document across them.

A composite

A composite judgment’s p comes from weights that Brussle fits on your labels. parts gives each part’s raw p, and combiner gives from_previous_epoch and the outcomes the weights were fitted on. Thresholds, filters, ranking and subscriptions use the combined p.

Answers of a judgment with relations

A judgment with relations reads other documents, so its answer says which data it read. Each field below is present only where it applies.
  • watermark says how far into the namespace’s writes Brussle had read when it read the context, on the same scale as revision. The answer reflects every write at or below it, whether to the document or to its related documents, while revision still names the document’s own revision.
  • answers_generation says how far the context had read other judgments’ answers and changes to blocks (a block is the documents that share a key value). Together with watermark, it is the answer’s position, so a roll-up child answer or a block change above it makes the answer pending or stale.
  • A failed answer has no watermark and no answers_generation, since it keeps its last good numbers and the failed attempt’s position does not describe them.
  • previous_revision, for a recipe with previous, is the revision that the previous rendering came from. It is absent when nothing was shown under previous, and a failed answer keeps the one from the last success.
  • For a choice among candidates, value is the matched document’s id or none_of_the_above. dist lists the escape and only those candidates with a probability above zero.
A relation that reads the document this one points to. With such a relation, the watermark also says which revision of that document the answer read.
  • The judgment’s re-judge scope is the set of documents that Brussle judges again when the document they point to changes. An answer outside the scope keeps the old revision and reads stale, with stale_reason referenced_changed.
  • On a get (not in query rows), the answer lists referenced_changes. Each entry is, for one such relation, the newest write to the document it points to that changed what the relation shows, with the write’s revision and time. The answer already includes an entry at or below the watermark. An entry above it makes the answer pending or stale inside the scope, and stale outside it.
  • referenced_changes[].deferred is true while that change’s fan-out waits for room under the judgment’s rolling limit or a larger block_cap.
  • referenced_changes[].generation is present when another judgment’s answer caused the change.

Query answers

A query can filter, sort and rank on answers, read only the current ones, and find the answers of one version. For example, ["answers.settles.thresholds.unmatched", "Eq", true] finds the payments that wait for a person. See querying answers.