#5976·pipecat

evals: JudgeVerdict.confidence never reaches the result objects

Author: kobikisCreated Sep 29, 2026Updated Oct 1, 2026
Labelsaccepted

Checked against main @ 422ad13f (2026-09-28) and released 1.12.0; the same in both.

JudgeVerdict carries a confidence and judge.py computes one for every verdict shape:

  • judge.py:327 — confidence: float | None = None, documented at :321 and in the module docstring at :88-108
  • set at :888 (reply, the chosen option's probability), :899 (yes/no), :915 (turn)
  • preserved through _explained at :940, and :761 uses it to decide whether the explainer runs

It is then dropped at every point a verdict becomes a result:

site what is kept
matcher.py:374 (_check_call_judge) verdict.reason only
matcher.py:559,:569 (_check_reply_judge) verdict.reason only
simulation_driver.py:360-363 (_judge_conversation, turn verdicts) reason=verdict.reason
simulation_driver.py:374 (the goal) self._reason = judged.goal.reason

and the result dataclasses have nowhere to put it: EvalAssertionFailure (results.py:47), EvalSimulationTurnVerdict (:193) and EvalSimulationResult (:249) each carry reason and no confidence.

So anything consuming EvalResult / EvalSimulationResult can see that a judge said no, never how sure it was — which is the difference between a clear regression and a borderline call, and the difference between a flake and a real failure.

It is most visible with a classifier judge, where the number is calibrated rather than a model's self-assessment. Measured here against a jev judge, through the same construction a run uses:

state:  {"conversation": [{"speaker": "user", "text": "can I book a table for six on Friday?"}],
         "latest_bot_reply": "Our address is 14 Mill Lane."}
answer: ChoiceResult(choice='no', probabilities={'yes': 0.0, 'no': 1.0, 'continue': 0.0}, confidence=0.99)

0.99 at the judge, nothing in the result.

Would you take a PR adding confidence: float | None = None to those three dataclasses and passing it at the four call sites? It is additive and defaults to absent, so existing consumers are unaffected, and absent stays distinguishable from zero.