pub struct E;Expand description
The E namespace — static factory methods for evaluation criteria.
Implementations§
Source§impl E
impl E
Sourcepub fn response_match() -> ECriterion
pub fn response_match() -> ECriterion
Exact response match criterion.
Sourcepub fn contains_match() -> ECriterion
pub fn contains_match() -> ECriterion
Substring containment criterion — scores 1.0 if output contains expected.
Sourcepub fn safety() -> ECriterion
pub fn safety() -> ECriterion
Safety criterion — placeholder that always passes.
Sourcepub fn semantic_match() -> ECriterion
pub fn semantic_match() -> ECriterion
Semantic match criterion — placeholder (requires LLM judge at runtime).
Sourcepub fn hallucination() -> ECriterion
pub fn hallucination() -> ECriterion
Hallucination detection criterion — placeholder.
Sourcepub fn trajectory() -> ECriterion
pub fn trajectory() -> ECriterion
Trajectory evaluation — placeholder for tool call sequence validation.
Sourcepub fn custom(
name: &'static str,
f: impl Fn(&str, &str) -> f64 + Send + Sync + 'static,
) -> ECriterion
pub fn custom( name: &'static str, f: impl Fn(&str, &str) -> f64 + Send + Sync + 'static, ) -> ECriterion
Custom evaluation criterion from a scoring function.
Sourcepub fn from_file(path: &str) -> EvalSuite
pub fn from_file(path: &str) -> EvalSuite
Load eval cases from a file path.
The file should contain one case per pair of consecutive lines:
odd lines are prompts, even lines are expected responses.
Lines starting with # are comments and blank lines are skipped.
Sourcepub fn persona(name: &'static str, description: &'static str) -> ECriterion
pub fn persona(name: &'static str, description: &'static str) -> ECriterion
Create a persona-based evaluator for user simulation.
The persona describes a simulated user with a given name and description, which can be used to generate realistic test interactions.