Criteria Score • Rust AI Agent SDK

CriteriaScore: Score for a specific criterion.

CriteriaScore

Defined in the eval module.

Rust AI Agent SDK

Score for a specific criterion.

Fields

NameTypeDescription
nameStringCriterion name
scoref64Score value
weightf64Weight for this criterion
feedbackOption<String>Feedback

Methods

new

rust
fn new(name: impl Into<String>, score: f64) -> Self

Create a new criteria score.

Parameters:

NameType
nameimpl Into&lt;String&gt;
scoref64

with_weight

rust
fn with_weight(mut self, weight: f64) -> Self

Set weight.

Parameters:

NameType
weightf64

with_feedback

rust
fn with_feedback(mut self, feedback: impl Into<String>) -> Self

Set feedback.

Parameters:

NameType
feedbackimpl Into&lt;String&gt;

weighted_score

rust
fn weighted_score(&self) -> f64

Get weighted score.

Source

View on GitHub

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


Related Documentation