Skip to main content

Judge

Defined in the eval module.
Rust AI Agent SDK A judge for evaluating outputs.

Fields

NameTypeDescription
nameStringJudge name
configJudgeConfigConfiguration
thresholdf64Threshold for passing

Methods

new

fn new(name: impl Into<String>) -> Self
Create a new judge. Parameters:
NameType
nameimpl Into&lt;String&gt;

with_config

fn with_config(mut self, config: JudgeConfig) -> Self
Set configuration. Parameters:
NameType
configJudgeConfig

with_threshold

fn with_threshold(mut self, threshold: f64) -> Self
Set threshold. Parameters:
NameType
thresholdf64

judge

fn judge(&self, _input: &str, _output: &str, _expected: Option<&str>) -> JudgeResult
Judge an output (placeholder - would use LLM in real implementation). Parameters:
NameType
_input&str
_output&str
_expectedOption&lt;&str&gt;

Source

View on GitHub

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