pub struct EconomicsMethodology {Show 16 fields
pub schema: String,
pub version: u32,
pub title: String,
pub question: String,
pub unit: String,
pub primary_metric: String,
pub classes: Vec<EconomicsClassDefinition>,
pub variants: Vec<EconomicsVariant>,
pub success: Vec<EconomicsGateDefinition>,
pub pairing: EconomicsPairing,
pub statistics: EconomicsStatisticsPolicy,
pub publication: EconomicsPublicationPolicy,
pub outliers: EconomicsOutlierPolicy,
pub hypotheses: Vec<EconomicsHypothesis>,
pub claims: Vec<EconomicsClaimBinding>,
pub changes: Vec<EconomicsMethodologyChange>,
}Expand description
.ai/repo/benchmarks/economics/methodology.yaml: what is measured, how, and when a
result may be published.
use majordomus_cli::economics::model::EconomicsMethodology;
let m: EconomicsMethodology = serde_json::from_value(serde_json::json!({
"schema": "economics-methodology/v1", "version": 1, "title": "Token economics",
"question": "How many tokens does a session consume with and without Majordomus?",
"unit": "tokens per completed task", "primary_metric": "effective_token_reduction",
"classes": [], "variants": [], "success": [],
"pairing": { "key": ["task"], "comparable": [], "valid": "both succeeded" },
"statistics": { "per_pair": "1 - t / c", "location": "median", "interval": "bootstrap",
"confidence_bp": 9500, "resamples": 1000, "seed": 1, "min_pairs_for_interval": 5 },
"publication": { "min_valid_pairs": 30, "min_categories": 4, "min_pairs_per_category": 5,
"min_repetitions": 3, "min_valid_pair_rate_bp": 8000, "max_interval_width_bp": 2000,
"require_current": true },
"outliers": { "rule": "No run is excluded." }
}))
.unwrap();
assert_eq!(m.statistics.confidence_bp, 9500);
assert!(m.hypotheses.is_empty() && m.claims.is_empty() && m.changes.is_empty());Fields§
§schema: Stringeconomics-methodology/v1.
version: u32The methodology version. Evidence under another version is never pooled.
title: StringA name.
question: StringThe question the benchmark answers.
unit: StringThe unit results are stated in.
primary_metric: StringThe metric a headline is about.
classes: Vec<EconomicsClassDefinition>The measurement classes.
variants: Vec<EconomicsVariant>The arms of the experiment.
success: Vec<EconomicsGateDefinition>The success gates.
pairing: EconomicsPairingPairing.
statistics: EconomicsStatisticsPolicyAggregation.
publication: EconomicsPublicationPolicyThe publication threshold.
outliers: EconomicsOutlierPolicyOutliers.
hypotheses: Vec<EconomicsHypothesis>What the benchmark tests.
claims: Vec<EconomicsClaimBinding>The claims of docs/CLAIMS.yaml that rest on a metric, and the standing the metric
must have before the claim may be guaranteed.
changes: Vec<EconomicsMethodologyChange>The change log.
Trait Implementations§
Source§impl Clone for EconomicsMethodology
impl Clone for EconomicsMethodology
Source§fn clone(&self) -> EconomicsMethodology
fn clone(&self) -> EconomicsMethodology
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EconomicsMethodology
impl Debug for EconomicsMethodology
Source§impl<'de> Deserialize<'de> for EconomicsMethodology
impl<'de> Deserialize<'de> for EconomicsMethodology
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for EconomicsMethodology
impl JsonSchema for EconomicsMethodology
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for EconomicsMethodology
impl PartialEq for EconomicsMethodology
Source§fn eq(&self, other: &EconomicsMethodology) -> bool
fn eq(&self, other: &EconomicsMethodology) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EconomicsMethodology
impl Serialize for EconomicsMethodology
impl StructuralPartialEq for EconomicsMethodology
Auto Trait Implementations§
impl Freeze for EconomicsMethodology
impl RefUnwindSafe for EconomicsMethodology
impl Send for EconomicsMethodology
impl Sync for EconomicsMethodology
impl Unpin for EconomicsMethodology
impl UnsafeUnpin for EconomicsMethodology
impl UnwindSafe for EconomicsMethodology
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more