1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! # graphrt-eval
//!
//! Evaluate graphrt workflows against test cases, in CI or from `cargo test`.
//!
//! - [`EvalSuite`]: an eval file (`*.eval.yaml`, Promptfoo-shaped `tests` /
//! `assert` / `defaultTest`) plus an optional JSONL dataset.
//! - [`Runner`]: runs every case against a [`Target`] (usually an
//! [`EngineTarget`] around one compiled graph), concurrently, and scores it.
//! - [`assertion`]: deterministic output checks, latency and token budgets,
//! agent trajectory checks and retrieval metrics, behind the [`Assertion`]
//! trait so other crates can add types.
//! - [`judge`]: LLM judges written as graphrt workflows (`type: judge`),
//! compiled once through a [`judge::JudgeLoader`] and versioned by fingerprint.
//! - [`stats`]: unbiased pass@k / pass^k over trials, and judge agreement
//! (TPR, TNR, Cohen's kappa) for [`calibration`] suites.
//! - [`online`]: evaluators that score a sample of production runs in
//! `graphrt serve` (no expected answers: judges, regexes, schemas, budgets,
//! trajectories), with deterministic per-run sampling and filters.
//! - [`EvalReport`]: the summary, the gate verdict, the [`baseline`]
//! comparison, and JSON / JUnit output.
//!
//! The harness is not part of the engine: it only consumes the run's event
//! stream, so runs evaluated here behave exactly like production runs.
//!
//! ```no_run
//! # async fn demo(engine: graphrt_core::Engine) -> Result<(), graphrt_eval::EvalError> {
//! use graphrt_eval::{EngineTarget, EvalSuite, Runner, RunnerOptions};
//!
//! let suite = EvalSuite::load(std::path::Path::new("evals/hello.eval.yaml"))?;
//! let report = Runner::new(RunnerOptions::default())
//! .run(&suite, &EngineTarget::new(engine), |result| eprintln!("{}", graphrt_eval::report::format_result_line(result)))
//! .await?;
//! assert!(report.gate_passed(), "{}", graphrt_eval::report::format_summary(&report));
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use ;
pub use EvalError;
pub use ;
pub use ;
pub use ;