Compare Traces
compare_tracesMeasure agent reliability across repeated evaluations by grouping them into cases or sessions and reporting pass rates, flaky cases, and repeat-aware intervals.
Instructions
How reliably does the agent answer the same question? Per-case pass rates, flaky cases, and an interval that respects repeats.
What it does. Groups evaluations by case_key (or session) and reports each case's pass rate with a Wilson interval, the flaky cases least reliable first, and an overall rate over cases, with an exact interval, rather than over pooled attempts. Deterministic, local, no model call. Full detail: iris://capabilities.
When not to use it. To compare two runs (compare_runs). To score an output (evaluate_output).
Returns. JSON: case_key, group_by, question, cases, attempts, overall, pooled, flaky_cases, by_case, summary.
Errors. IRIS_STORAGE_ERROR. No matching evaluations is cases 0, not an error. Failures return {"error":{code,message,recovery}} with isError; follow recovery.
Siblings. compare_runs — compare two runs against each other; log_trace — record an execution with a case_key; get_traces — read the traces themselves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | No | narrow to one run; omit to read every evaluation that carries a case key | |
| session | No | narrow to one session (the turns logged with that session_id) | |
| case_key | No | narrow to a single case — the fastest way to ask "is this one question flaky?" | |
| group_by | No | case_key (default): repeats of one question; session: the turns of one conversation, so a session answered both ways reads as flaky and by_case rows carry session ids | |
| question | No | read the rate for ONE question: only evaluations that judged it count, and an attempt passes when every rule answering it passed — not the composed verdict | |
| min_attempts | No | ignore cases asked fewer than this many times (default 1). A case asked once cannot be shown to be flaky |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cases | Yes | ||
| pooled | Yes | ||
| by_case | Yes | ||
| overall | Yes | ||
| summary | Yes | ||
| attempts | Yes | ||
| case_key | Yes | ||
| group_by | Yes | ||
| question | Yes | ||
| flaky_cases | Yes |