pub struct Item {
pub id: String,
pub family: Family,
pub stratum: Stratum,
pub group: String,
pub seed: u64,
pub state: Entry,
pub question: QuestionSpec,
pub truth: usize,
}Expand description
One score-bearing, verifiable-outcome item.
truth is the index of the correct label in the question’s canonical
label order (["false","true"] for noul, option order for choice, level
order for score). The truth procedure is mechanical — every item is
generated together with its answer, immune to teacher-pretraining
contamination by construction.
Fields§
§id: StringStable item id: vob1-<family>-<stratum>-<kind>-<seed:016x>.
family: FamilyQuestion family.
stratum: StratumDifficulty/robustness stratum.
group: StringPermutation group: all cyclic rotations of one choice item share this id (the base item’s id). Base items are their own group.
seed: u64The raw seed this item was generated from (reproducibility handle).
state: EntryShared state the question refers to.
question: QuestionSpecThe jev-1 question spec (question.id == item.id).
truth: usizeIndex of the correct label in canonical label order.
Implementations§
Source§impl Item
impl Item
Sourcepub fn noul(
family: Family,
stratum: Stratum,
seed: u64,
state: Entry,
instructions: impl Into<String>,
truth: bool,
) -> Self
pub fn noul( family: Family, stratum: Stratum, seed: u64, state: Entry, instructions: impl Into<String>, truth: bool, ) -> Self
Build a noul item.
Sourcepub fn choice(
family: Family,
stratum: Stratum,
seed: u64,
state: Entry,
instructions: impl Into<String>,
options: Vec<String>,
correct: usize,
) -> Self
pub fn choice( family: Family, stratum: Stratum, seed: u64, state: Entry, instructions: impl Into<String>, options: Vec<String>, correct: usize, ) -> Self
Build a choice item. correct is the index of the correct option.
Sourcepub fn score(
family: Family,
stratum: Stratum,
seed: u64,
state: Entry,
instructions: impl Into<String>,
levels: usize,
correct_level: usize,
) -> Self
pub fn score( family: Family, stratum: Stratum, seed: u64, state: Entry, instructions: impl Into<String>, levels: usize, correct_level: usize, ) -> Self
Build a score item over levels ordered rubric texts.
Sourcepub fn truth_label(&self) -> String
pub fn truth_label(&self) -> String
The correct label string in canonical label order.
Sourcepub fn truth_distribution(&self) -> Vec<f32>
pub fn truth_distribution(&self) -> Vec<f32>
One-hot truth distribution over the canonical labels.
Sourcepub fn cyclic_permutation(&self, rotation: usize) -> Option<Item>
pub fn cyclic_permutation(&self, rotation: usize) -> Option<Item>
The cyclic permutation of a choice item (CircularEval stratum).
Options rotate left by rotation positions; the truth index rotates
with them so the same option stays correct. Returns None for
non-choice questions (score levels are ordered — permutation would
change the question — and noul has no options) and for rotation 0.
Sourcepub fn canonical_bytes(&self) -> Vec<u8> ⓘ
pub fn canonical_bytes(&self) -> Vec<u8> ⓘ
Canonical byte form — the exact input the manifest hashes.
FROZEN (vob-item/1): length-prefixed fields, one per line, so the
hash is independent of any serializer’s key order or float formatting.
Changing anything here invalidates every published item hash.
Sourcepub fn hash(&self) -> String
pub fn hash(&self) -> String
blake3 hex digest of Self::canonical_bytes — the manifest hash.