pub struct Report {
pub per_example: Vec<ExampleReport>,
pub summary: HashMap<String, ScoreSummary>,
pub failures: Vec<FailureRecord>,
pub cost: OverallCost,
pub run_id: String,
}Expand description
Evaluation report (with original text, stddev, failure list; deserializable).
Fields§
§per_example: Vec<ExampleReport>Per-example complete records (including input/reference/prediction originals)
summary: HashMap<String, ScoreSummary>Per-evaluator summaries (mean + stddev + sample count)
failures: Vec<FailureRecord>Failure records collected by per-item tolerance (empty = all succeeded)
cost: OverallCostCost ledger for the run (E1). Old reports without this field deserialize to the default.
run_id: StringStable identifier of this evaluation run (B9): the join key against traces/spans.
Set explicitly via EvalRunner::with_run_id or auto-generated as a UUID v4 when the
runner runs. The predictor receives it through Predictor::begin_run so a system
under test can stamp it (e.g. into RunnableConfig.metadata["trace_id"], which the agent
executor propagates to callback/OTel spans). Old reports deserialize to an empty id.
Implementations§
Source§impl Report
impl Report
Sourcepub fn to_jsonl(&self) -> String
pub fn to_jsonl(&self) -> String
Renders the report as JSONL: one example record per line, carrying the run id.
{"run_id":"...","index":0,"input":"...","reference":"...","prediction":"...",
"contexts":["..."],"scores":{"exact_match":{"value":1.0}}}Sourcepub async fn write_jsonl(&self, path: impl AsRef<Path>) -> Result<(), EvalError>
pub async fn write_jsonl(&self, path: impl AsRef<Path>) -> Result<(), EvalError>
Writes Self::to_jsonl to path (async, truncating/overwriting).