Evaluation Score • Rust AI Agent SDK

EvaluationScore: Score from an evaluation.

EvaluationScore

Defined in the eval module.

Rust AI Agent SDK

Score from an evaluation.

Fields

NameTypeDescription
valuef64Score value (0.0 to 1.0)
reasoningOption<String>Score reasoning
confidenceOption<f64>Confidence level

Methods

new

rust
fn new(value: f64) -> Self

Create a new score.

Parameters:

NameType
valuef64

with_reasoning

rust
fn with_reasoning(mut self, reasoning: impl Into<String>) -> Self

Set reasoning.

Parameters:

NameType
reasoningimpl Into&lt;String&gt;

with_confidence

rust
fn with_confidence(mut self, confidence: f64) -> Self

Set confidence.

Parameters:

NameType
confidencef64

is_passing

rust
fn is_passing(&self, threshold: f64) -> bool

Check if passing (&gt;= threshold).

Parameters:

NameType
thresholdf64

as_percentage

rust
fn as_percentage(&self) -> f64

Convert to percentage.

Source

View on GitHub

praisonai/src/eval/mod.rs at line 29


Related Documentation