pub struct GoldSample {
pub id: String,
pub path: PathBuf,
pub final_label: SampleLabel,
pub vt_label: Option<SampleLabel>,
pub llm_consensus: Option<SampleLabel>,
pub human_review: Option<SampleLabel>,
pub disputed: bool,
pub focus_category: Option<ThreatCategory>,
pub attack_family: Option<String>,
}Expand description
One curated sample with full label provenance. New fields are
#[serde(default)] so an older on-disk manifest still loads.
Fields§
§id: String§path: PathBuf§final_label: SampleLabelThe curated ground-truth label used for scoring. For a resolved dispute this equals the human adjudication.
vt_label: Option<SampleLabel>Noisy upstream VT label, retained for provenance/audit.
llm_consensus: Option<SampleLabel>≥2-of-3 LLM consensus label; None when no consensus formed.
human_review: Option<SampleLabel>A human reviewer’s adjudication of a disputed case.
disputed: boolVT and LLM consensus disagreed (or consensus was absent):
requires human_review before the sample is admitted to
scoring.
focus_category: Option<ThreatCategory>§attack_family: Option<String>Implementations§
Source§impl GoldSample
impl GoldSample
Sourcepub fn is_admitted(&self) -> bool
pub fn is_admitted(&self) -> bool
A sample is admitted to scoring iff it is not disputed, or it is disputed but a human has reviewed it. Disputed-and-unreviewed samples are excluded so an unadjudicated VT/LLM disagreement can never pollute the curated truth.
Sourcepub fn derive_disputed(&self) -> bool
pub fn derive_disputed(&self) -> bool
Decide whether a sample is disputed from its provenance: VT and LLM consensus disagree, or consensus is absent while a VT label exists. Pure — the build/review tooling uses this so the dispute flag is derived, not hand-set.
Trait Implementations§
Source§impl Clone for GoldSample
impl Clone for GoldSample
Source§fn clone(&self) -> GoldSample
fn clone(&self) -> GoldSample
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more