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:
objectA 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_afterthat 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.reasonis 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:
objectWhat 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.
- 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:
objectOutcome 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_runmeans the run ended before reaching this turn — seestop_on_failure.failures – The turn’s failed assertions, in order; empty unless
statusisfailed.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.
- class pipecat.evals.results.EvalTurnResult(**kwargs)[source]
Bases:
EvalScriptTurnResultDeprecated alias for
EvalScriptTurnResult.Deprecated since version 1.9.0: Use
EvalScriptTurnResultinstead. 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:
objectOutcome 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
EvalScriptTurnResultper scenario turn, in order — what a per-turn pass rate is computed from, without needing the scenario file for a denominator.failuresis 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_responseassertion without audio mode); the string is the reason. Such a result is neither passed nor failed.
- class pipecat.evals.results.EvalResult(**kwargs)[source]
Bases:
EvalScriptResultDeprecated alias for
EvalScriptResult.Deprecated since version 1.9.0: Use
EvalScriptResultinstead. 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:
objectThe 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
assistantmessages 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, ornonewhen 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;
Nonewhen it gave none.probabilities – The probability of each outcome the classifier was offered; empty when it gave no verdict.
- 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:
objectOne 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;
Nonewhen 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
Nonewhen 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;
Nonefor a judged one, or when there was nothing to measure.failure_kind – How the metric failed, for grouping across runs:
judge_nowhen the judge rejected a turn,judge_no_verdictwhen it only left turns unanswered,out_of_rangefor a measure outside its bounds,function_callsfor a call list that did not match;Nonewhen it passed.criterion – The criterion each bot turn was judged on, as the simulation worded it;
Nonefor a measured metric.
- 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:
objectOutcome 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);
succeededis 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
usermessages and the bot’s asassistant(the convention scenarios’ judges use); theassistantmessages are the bot turns the metrics scored.conversation – The conversation as a conversation file holds it, the
messageswith the bot’s function calls in place (seepipecat.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_callclaim (success,reason) when it made one; advisory, the judge decidessucceeded.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;
Nonewhen 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
successas it was worded.
- class pipecat.evals.results.EvalScriptTurnProgress(turn_index: int, expectation_index: int, event_name: str, status: str, detail: str = '')[source]
Bases:
objectA 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_afterthat never fired).event_name – The expectation’s event (or the user text for a turn header).
status –
turn(header),matched,failed, ortimeout.detail – Optional extra text (failure reason, user utterance, …).
- class pipecat.evals.results.EvalSimulationProgress(status: str, text: str, turn: int)[source]
Bases:
objectA real-time progress record emitted while a simulation runs (for verbose output).
- Parameters:
status –
botfor a response the bot finished,userfor a turn the persona spoke, orendedonce 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:
EvalScriptTurnProgressDeprecated alias for
EvalScriptTurnProgress.Deprecated since version 1.9.0: Use
EvalScriptTurnProgressinstead. Will be removed in 2.0.0.
- class pipecat.evals.results.EvalTrace[source]
Bases:
objectTimestamped, 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 onsend_afteris tagged with that turn even though it is the previous turn’s output; thesend:lines mark the boundary.