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
| Name | Type | Description |
|---|---|---|
name | String | Judge name |
config | JudgeConfig | Configuration |
threshold | f64 | Threshold for passing |
Methods
new
fn new(name: impl Into<String>) -> SelfCreate a new judge.
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
with_config
fn with_config(mut self, config: JudgeConfig) -> SelfSet configuration.
Parameters:
| Name | Type |
|---|---|
config | JudgeConfig |
with_threshold
fn with_threshold(mut self, threshold: f64) -> SelfSet threshold.
Parameters:
| Name | Type |
|---|---|
threshold | f64 |
judge
fn judge(&self, _input: &str, _output: &str, _expected: Option<&str>) -> JudgeResultJudge an output (placeholder – would use LLM in real implementation).
Parameters:
| Name | Type |
|---|---|
_input | &str |
_output | &str |
_expected | Option<&str> |
Source
View on GitHubpraisonai/src/eval/mod.rs at line 749