Skip to content
Unverified: This page has not yet been anchored to automated code tests.

vox-eval API Reference (generated)

Crate: vox-eval · Version: 0.6.0 · Target: Library (lib.rs)

Evaluation metrics for model outputs and Vox code samples: deterministic scoring heuristics (format/safety/quality/parse) + MENS CompileVerdict. Not the interpreter — the --interp evaluator lives in vox-compiler/src/eval/.

Lightweight evaluation metrics for model outputs and Vox code samples (held-out / smoke tests).

Functions are deterministic heuristics—not a replacement for human eval or full static analysis.

ModuleDescription
compare—
corpus_score—
corpus_stats—
mens—
provenance—
report—
StructDescription
EvalMetricsAggregated scores from a single eval run (format, safety, quality proxy, parse validity, coverage).
CollateralDamageReportResult of evaluating collateral damage on a held-out benchmark.
CollateralDamageConfigConfiguration for collateral damage evaluation.
SemanticEntropyReportResult of evaluating semantic entropy (diversity) of model samples.
FunctionDescription
format_validity_scoreScores model output based on whether it starts with common refusal prefixes.
is_safety_rejectionReturns true if the text matches known unsafe prompt-injection heuristics.
detect_constructsReturns construct names whose regex matches at least once in code.
construct_coverage_score—
scope_compliance_scoreBounded-domain heuristic for docs / examples: 1.0 when no high-risk escape patterns appear. Used by vox doctor --scope as a coarse guardrail (not a full security audit).
eval_collateral_damageEvaluate collateral damage by comparing pre/post training scores on a held-out benchmark. Research (Continual Learning §catastrophic-forgetting) proves that fine-tuning without held-out evaluation hides regression. This function computes the degradation rate and recommends blocking promotion if it exceeds the threshold. eval_fn is a caller-supplied closure that evaluates the model against the benchmark and returns a score in [0.0, 1.0].
eval_collateral_damage_suiteEvaluate collateral damage across multiple benchmarks. Returns Err with the first benchmark that exceeds the threshold.
cargo_build_rewardCompilation-driven feedback for Rust code. Spawns a lightweight cargo check in a temporary directory containing the provided snippet. Returns 1.0 if it passes, 0.0 otherwise.
cargo_test_rewardTest-driven feedback for Rust code. Spawns a lightweight cargo test in a temporary directory containing the provided snippet. Returns 1.0 if it passes, 0.0 otherwise.
eval_semantic_entropySample n outputs from the model for the same prompt, extract code, and measure structural diversity based on a pseudo-AST hash. This avoids a circular dependency on the full vox-compiler by using a regex-based structural “shape” extraction.
extract_vox_codeHeuristic code extractor for triple-backticked blocks.