results

What an eval run produces.

Per-assertion failures, per-turn outcomes, the run’s EvalScriptResult (a scenario) or EvalSimulationResult (a simulation), the live progress records, and the harness’s own trace.

class pipecat.evals.results.EvalAssertionFailure(turn_index: int, expectation_index: int, event_name: str, reason: str, kind: str)[source]

Bases: object

A single failed assertion within an eval.

Parameters:
  • turn_index – Index of the turn that failed.

  • expectation_index – Index of the expectation within the turn, or -1 for a turn-level failure (e.g. a send_after that never fired).

  • event_name – The expectation’s event name.

  • reason – Human-readable explanation of the failure.

  • kind – Machine-readable failure category, one of FAILURE_KINDS. Says how the assertion failed (the judge rejected the reply, no event arrived, a function call was missing, …), not what it means about the bot. reason is free text and differs on every run — often judge prose — so grouping failures across many runs keys on this.

class pipecat.evals.results.EvalExpectationResult(expectation_index: int, event_name: str, passed: bool, matched: str = '')[source]

Bases: object

What one expectation of a turn resolved to, pass or fail.

Parameters:
  • expectation_index – Index of the expectation within the turn.

  • event_name – The expectation’s event name.

  • passed – Whether the expectation was satisfied.

  • matched – What it matched, in short, when it passed: the marker of an llm_marker, a function call’s signature, the text of a reply or a transcript. Empty for an event that carries no text, and on a failure, whose reason is in the turn’s failures.

matched: str = ''
class pipecat.evals.results.EvalScriptTurnResult(turn_index: int, status: str = 'not_run', failures: list[EvalAssertionFailure] = <factory>, expectations: list[EvalExpectationResult] = <factory>, duration_ms: int = 0)[source]

Bases: object

Outcome of one turn within a scenario run.

A turn’s expectations share one deadline and stop at the first to time out, so the turn is the unit a run is scored by.

Parameters:
  • turn_index – Index of the turn in the scenario.

  • status – One of TURN_STATUSES. not_run means the run ended before reaching this turn — see stop_on_failure.

  • failures – The turn’s failed assertions, in order; empty unless status is failed.

  • expectations – What each expectation resolved to, in order, up to the one that timed out; what a passed run matched is only recorded here.

  • duration_ms – Wall-clock time the turn took, in milliseconds; 0 when the turn was not run.

status: str = 'not_run'
duration_ms: int = 0
class pipecat.evals.results.EvalTurnResult(**kwargs)[source]

Bases: EvalScriptTurnResult

Deprecated alias for EvalScriptTurnResult.

Deprecated since version 1.9.0: Use EvalScriptTurnResult instead. Will be removed in 2.0.0.

class pipecat.evals.results.EvalScriptResult(scenario_name: str, passed: bool, failures: list[EvalAssertionFailure] = <factory>, turns: list[EvalScriptTurnResult] = <factory>, duration_ms: int = 0, events_seen: list[dict] = <factory>, debug_log: list[str] = <factory>, skipped: str | None = None)[source]

Bases: object

Outcome of running a scenario in an EvalScriptSession.

Parameters:
  • scenario_name – Name of the scenario that was run.

  • passed – Whether every assertion passed.

  • failures – The assertions that failed, in order.

  • turns – One EvalScriptTurnResult per scenario turn, in order — what a per-turn pass rate is computed from, without needing the scenario file for a denominator. failures is these turns’ failures flattened, plus any that belong to no turn (a failed connect).

  • duration_ms – Wall-clock time the run took, in milliseconds.

  • events_seen – Every friendly event observed, for diagnostics.

  • debug_log – Timestamped trace of the harness’s own decisions (events received, audio transcribed, matcher progress), for diagnosing flaky runs. Saved per-scenario by the orchestrator alongside the bot log.

  • skipped – When set, the scenario was not run (e.g. a tts_response assertion without audio mode); the string is the reason. Such a result is neither passed nor failed.

duration_ms: int = 0
skipped: str | None = None
class pipecat.evals.results.EvalResult(**kwargs)[source]

Bases: EvalScriptResult

Deprecated alias for EvalScriptResult.

Deprecated since version 1.9.0: Use EvalScriptResult instead. Will be removed in 2.0.0.

class pipecat.evals.results.EvalSimulationTurnVerdict(turn: int, passed: bool, reason: str, verdict: str = 'no', confidence: float | None = None, probabilities: dict[str, float]=<factory>)[source]

Bases: object

The judge’s verdict on one bot turn, for a per-turn metric.

Parameters:
  • turn – The bot turn, 1-based, counting the turns in which the bot said something; it indexes the assistant messages of the run’s conversation.

  • passed – Whether the turn satisfied the criterion.

  • reason – The explainer’s one-sentence reason for the verdict, or the classifier’s probabilities when nothing explained it.

  • verdict – The judge’s answer: yes, no, or none when it gave no verdict on the turn, which counts as a no.

  • confidence – How sure the judge is of the verdict, from 0 to 1; None when it gave none.

  • probabilities – The probability of each outcome the classifier was offered; empty when it gave no verdict.

verdict: str = 'no'
confidence: float | None = None
class pipecat.evals.results.EvalSimulationMetricScore(name: str, score: float | None, passed: bool = True, reason: str = '', min_score: float | None = None, verdicts: list[EvalSimulationTurnVerdict] = <factory>, value: float | None = None, failure_kind: str | None = None, criterion: str | None = None)[source]

Bases: object

One quality metric’s outcome for a simulation run.

Parameters:
  • name – The metric’s name, from the simulation file.

  • score – The share of the bot’s turns the judge answered yes for, in 0..1, each turn a yes or a no; None when there was no turn to judge.

  • passed – Whether the metric let the run pass: its score reached its min_score, or it has none.

  • reason – What the score rests on: the turns that fell short and why, or that every turn passed.

  • min_score – The score the metric needed, or None when it only reports.

  • verdicts – The judge’s verdict on each bot turn, in order; empty for a measured metric.

  • value – What a measured metric measured, in its unit; None for a judged one, or when there was nothing to measure.

  • failure_kind – How the metric failed, for grouping across runs: judge_no when the judge rejected a turn, judge_no_verdict when it only left turns unanswered, out_of_range for a measure outside its bounds, function_calls for a call list that did not match; None when it passed.

  • criterion – The criterion each bot turn was judged on, as the simulation worded it; None for a measured metric.

passed: bool = True
reason: str = ''
min_score: float | None = None
value: float | None = None
failure_kind: str | None = None
criterion: str | None = None
class pipecat.evals.results.EvalSimulationResult(simulation_name: str, succeeded: bool, reason: str = '', error: str | None = None, metrics: list[EvalSimulationMetricScore] = <factory>, messages: list[dict] = <factory>, conversation: list[dict] = <factory>, turns: int = 0, ended_by: str = 'error', end_call: dict | None = None, duration_ms: int = 0, events_seen: list[dict] = <factory>, debug_log: list[str] = <factory>, confidence: float | None = None, probabilities: dict[str, float]=<factory>, success: str = '')[source]

Bases: object

Outcome of one run of a simulation.

Parameters:
  • simulation_name – Name of the simulation that was run.

  • succeeded – Whether the judge decided the goal was achieved.

  • reason – The judge’s justification for succeeded, or the error.

  • error – When set, the run did not complete (a failed connect, a harness error); succeeded is then False and the run is neither a goal success nor a goal failure.

  • metrics – The quality metrics’ outcomes.

  • messages – The conversation, with the persona’s turns as user messages and the bot’s as assistant (the convention scenarios’ judges use); the assistant messages are the bot turns the metrics scored.

  • conversation – The conversation as a conversation file holds it, the messages with the bot’s function calls in place (see pipecat.evals.conversation).

  • turns – How many turns the persona took.

  • ended_by – How the run ended, one of SIMULATION_ENDINGS.

  • end_call – The persona’s own end_call claim (success, reason) when it made one; advisory, the judge decides succeeded.

  • duration_ms – Wall-clock time the run took, in milliseconds.

  • events_seen – Every friendly event observed, for diagnostics.

  • debug_log – Timestamped trace of the harness’s own decisions.

  • confidence – How sure the judge is of its goal verdict, from 0 to 1; None when it gave none.

  • probabilities – The probability of each answer to the goal question; empty when the judge gave none.

  • success – The goal the conversation was judged on, the simulation’s success as it was worded.

reason: str = ''
error: str | None = None
turns: int = 0
ended_by: str = 'error'
end_call: dict | None = None
duration_ms: int = 0
confidence: float | None = None
success: str = ''
property passed: bool

Whether the run completed, achieved its goal, and no metric fell short.

property failure: str | None

the error, the goal, or the first failed metric.

Type:

Why the run did not pass, or None

class pipecat.evals.results.EvalScriptTurnProgress(turn_index: int, expectation_index: int, event_name: str, status: str, detail: str = '')[source]

Bases: object

A real-time progress record emitted while a turn runs (for verbose output).

Parameters:
  • turn_index – The turn being run.

  • expectation_index – Index of the expectation, or -1 for turn-level records (the turn header, or a send_after that never fired).

  • event_name – The expectation’s event (or the user text for a turn header).

  • status – turn (header), matched, failed, or timeout.

  • detail – Optional extra text (failure reason, user utterance, …).

detail: str = ''
class pipecat.evals.results.EvalSimulationProgress(status: str, text: str, turn: int)[source]

Bases: object

A real-time progress record emitted while a simulation runs (for verbose output).

Parameters:
  • status – bot for a response the bot finished, user for a turn the persona spoke, or ended once the conversation is over.

  • text – What was said; for ended, how the conversation ended (SIMULATION_ENDINGS).

  • turn – The persona’s turn count so far.

class pipecat.evals.results.EvalTurnProgress(**kwargs)[source]

Bases: EvalScriptTurnProgress

Deprecated alias for EvalScriptTurnProgress.

Deprecated since version 1.9.0: Use EvalScriptTurnProgress instead. Will be removed in 2.0.0.

class pipecat.evals.results.EvalTrace[source]

Bases: object

Timestamped, turn-tagged log of the harness’s own decisions, kept as the result’s debug_log.

The tag is the turn the harness is processing ([--] before the first). An event that lands while a turn waits on send_after is tagged with that turn even though it is the previous turn’s output; the send: lines mark the boundary.

__init__()[source]

Initialize an empty trace; start() anchors its clock.

lines: list[str]
turn: int
start() → None[source]

Anchor the trace’s timestamps at now (the start of the run).

log(msg: str) → None[source]

Append one line, stamped with the seconds since start() and the turn.