Judge • Rust AI Agent SDK

Judge: A judge for evaluating outputs.

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

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

Create a new judge.

Parameters:

NameType
nameimpl Into&lt;String&gt;

with_config

rust
fn with_config(mut self, config: JudgeConfig) -> Self

Set configuration.

Parameters:

NameType
configJudgeConfig

with_threshold

rust
fn with_threshold(mut self, threshold: f64) -> Self

Set threshold.

Parameters:

NameType
thresholdf64

judge

rust
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