Skip to main content
Criteria evaluation measures agent output against custom standards.

Quick Start

1

Define Criteria

use praisonai::CriteriaEvaluator;

let evaluator = CriteriaEvaluator::new()
    .criterion("clarity", "Is the response clear and easy to understand?")
    .criterion("accuracy", "Is the information factually correct?")
    .criterion("completeness", "Does it fully answer the question?")
    .build();

let scores = evaluator.evaluate(&response);
for (name, score) in scores {
    println!("{}: {:.0}%", name, score * 100.0);
}

Common Criteria

CriterionDescription
ClarityEasy to understand
AccuracyFactually correct
CompletenessFully addresses query
ConcisenessNo unnecessary content
HelpfulnessActionable and useful