Expand description
Arrow emission: the columnar contract for decision batches.
For a set of questions, DecisionSchema emits (in question authoring order, then
the version triple):
| column | type | nullability | content |
|---|---|---|---|
{qid}.probabilities | fixed_size_list<f32; N> | nullable | one probability per label, canonical order; null = abstained |
{qid}.label | utf8 | nullable | argmax label (D6 tie-break); null = abstained |
{qid}.conformal_set | list<utf8> | nullable | conformal prediction set — reserved in v1, may be entirely unpopulated |
schema_version | utf8 | non-null | question-set schema version |
model_version | utf8 | non-null | resolved model id |
calib_version | utf8 | nullable | calibration-fit version; null = uncalibrated |
N (cardinality) is 2 for noul (["false", "true"]), the option count for choice, the
level count for score.
§Contract rules
- Label lists live in Arrow field metadata on the probabilities column
(
jev.kind,jev.labelsas a JSON array) — never in schema metadata, which this crate always emits empty. Calibration parameters are likewise never schema content; they are rows in the P0.3 metrics tables. - Label-set evolution is schema evolution and fails loudly:
DecisionSchema::check_evolutionrejects any change to an existing question’s kind or label set — and any flip of conformal-set emission, which changes the emitted column set; the remedy is minting a new schema version (theschema_versiontriple column), which is what prepared statements pin (P3.5). - Question ids must be identifier-safe (
[A-Za-z_][A-Za-z0-9_]*) for the columnar surface so emitted columns compose unquoted in SQL (the ADBC path). Wire-level ids stay opaque; the constraint applies at schema construction, not at authoring.
Structs§
- Answer
Row - One row of a decision batch: answers keyed by question id.
- Decision
Schema - The Arrow-emission view over a set of questions. Cheap to clone (the questions are shared); the Arrow schema itself is rebuilt on demand so an emitted schema can never drift from the IR.
- Evolution
Report - Compatible differences between two schema generations.
- Label
Change - One changed question in a failed label-set evolution check.
- Label
Evolution Error - Label-set evolution on an existing question — schema evolution fails loudly.
Enums§
- Arrow
Schema Error - Why a set of questions cannot back an Arrow schema.
- Batch
Error - Why a row cannot be encoded into a batch under this schema.
- Evolution
Error - Why a schema generation pair fails the evolution check.
Constants§
- CALIB_
VERSION_ COLUMN - Column name of the calibration-fit version (version triple; null = uncalibrated).
- FIELD_
META_ KIND - Field-metadata key carrying the question kind (
noul/choice/score). - FIELD_
META_ LABELS - Field-metadata key carrying the label list as a JSON array in canonical order.
- MODEL_
VERSION_ COLUMN - Column name of the resolved model id (version triple).
- SCHEMA_
VERSION_ COLUMN - Column name of the question-set schema version (version triple).