Skip to main content

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

fn new(name: impl Into<String>, score: f64) -> Self
Create a new criteria score. Parameters:
NameType
nameimpl Into&lt;String&gt;
scoref64

with_weight

fn with_weight(mut self, weight: f64) -> Self
Set weight. Parameters:
NameType
weightf64

with_feedback

fn with_feedback(mut self, feedback: impl Into<String>) -> Self
Set feedback. Parameters:
NameType
feedbackimpl Into&lt;String&gt;

weighted_score

fn weighted_score(&self) -> f64
Get weighted score.

Source

View on GitHub

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