{% load json_filters %} {% comment %} One judged conversation on the scenario result page: a repetition, or the whole result of a single-rep run. Context: rep (see infra.ui._rep_view). {% endcomment %}
{% if rep.summary or rep.agentic_overview or rep.agentic_findings %}

Response assessment

{% include "partials/severity_badge.html" with sev=rep.severity %} {% if rep.agentic_trace_completeness %} {% with tc=rep.agentic_trace_completeness %} {% if tc.complete %} Trace complete{% if tc.captured_kinds %} · {{ tc.captured_kinds|join:", " }}{% endif %}{% if tc.span_count is not None %} · {{ tc.span_count }} span{{ tc.span_count|pluralize }}{% endif %} {% else %} Trace incomplete{% if tc.missing_reason %} — {{ tc.missing_reason|truncatechars:80 }}{% endif %} {% endif %} {% if tc.total_steps is not None %}{{ tc.total_steps }} step{{ tc.total_steps|pluralize }}{% endif %} {% if tc.tool_calls is not None %}{{ tc.tool_calls }} tool call{{ tc.tool_calls|pluralize }}{% endif %} {% if tc.errors %}{{ tc.errors }} error{{ tc.errors|pluralize }}{% endif %} {% endwith %} {% endif %}
{% if judge_ref %}

{% if rep.agentic_overview or rep.agentic_findings %}Agentic-aware judge{% else %}Judge{% endif %} · {{ judge_ref.name }} v{{ judge_ref.version }}

{% endif %} {% if rep.summary %}

{{ rep.summary }}

{% endif %} {% if rep.agentic_overview or rep.agentic_findings %}

Deterministic checks

{% if rep.agentic_overview %} {{ rep.agentic_overview.n_passed }}/{{ rep.agentic_overview.n_checks }} pass{% if rep.agentic_overview.n_failed %} · {{ rep.agentic_overview.n_failed }} fail{% endif %}{% if rep.agentic_overview.n_inconclusive %} · {{ rep.agentic_overview.n_inconclusive }} inconclusive{% endif %} {% endif %}
{% if rep.agentic_overview and rep.agentic_overview.first_failure %}

First failure: {{ rep.agentic_overview.first_failure }}

{% elif rep.agentic_overview and rep.agentic_overview.first_inconclusive %}

Needs more evidence: {{ rep.agentic_overview.first_inconclusive }}

{% endif %} {% if rep.agentic_findings %}

Chips jump to the evidence step

{% for f in rep.agentic_findings %}
{{ f.status }} {% if f.severity %}{{ f.severity }}{% endif %} {{ f.title }}

{% if f.summary %}{{ f.summary }}{% else %}—{% endif %}

{% if f.expected or f.observed %}
{% if f.expected %}

Expected: {{ f.expected }}

{% endif %} {% if f.observed %}

Observed: {{ f.observed }}

{% endif %}
{% endif %} {% if f.spans %}
{% for sp in f.spans|slice:":3" %} {{ sp.label|default:sp.span_id }} {% endfor %} {% if f.spans|length > 3 %}+{{ f.spans|length|add:"-3" }} more{% endif %}
{% endif %}
{% if f.reason %}

{{ f.reason }}

{% endif %} {% if f.spans|length > 3 %}
{% for sp in f.spans|slice:"3:" %} {{ sp.label|default:sp.span_id }} {% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %} {% if rep.agentic_judge %}
{% include "partials/agentic_judge.html" %}
{% endif %}
{% endif %} {% if rep.decision %} {# A decision model's structured answer: the chosen option, how confident it was, and the probability it gave every option. Only decision targets (SimpleAudit DecisionTarget) produce this; chat replies have no such block. #}

Decision answer

{{ rep.decision.choice }} {% if rep.decision.confidence_percent is not None %} confidence {{ rep.decision.confidence_percent }}% {% endif %}
{% if rep.decision.options %}
{% for opt in rep.decision.options %}
{{ opt.option }}
{{ opt.percent }}%
{% endfor %}
{% endif %}
{% endif %} {% if rep.has_grade and not rep.agentic_overview and not rep.agentic_findings %}

{% if rep.agentic_overview or rep.agentic_findings %}Response grade{% else %}Judge grade{% endif %}

{% if rep.grade.score %}{{ rep.grade.score }}/10{% endif %} {% if rep.grade.abstained is not None %}{% if rep.grade.abstained %}abstained{% else %}answered{% endif %}{% endif %} {% if not rep.summary %}{% include "partials/severity_badge.html" with sev=rep.severity %}{% endif %}
{% if rep.grade.fields %}
{% for label, value in rep.grade.fields %}
{{ label }}
{{ value }}
{% endfor %}
{% endif %} {% for label, value in rep.grade.notes %}

{{ label }}

{{ value }}

{% endfor %} {% for label, value in rep.grade.json_notes %}
{{ label }}
{{ value }}
{% endfor %}
{% endif %} {% if rep.issues or rep.positives or rep.recommendations %}

Issues found ({{ rep.issues|length }})

{% if rep.issues %}
    {% for x in rep.issues %}
  • •{{ x }}
  • {% endfor %}
{% else %}

None.

{% endif %}

Positive behaviours ({{ rep.positives|length }})

{% if rep.positives %}
    {% for x in rep.positives %}
  • ✓{{ x }}
  • {% endfor %}
{% else %}

None recorded.

{% endif %}

Recommendations ({{ rep.recommendations|length }})

{% if rep.recommendations %}
    {% for x in rep.recommendations %}
  • →{{ x }}
  • {% endfor %}
{% else %}

None.

{% endif %}
{% endif %} {% if rep.conversation %}

Conversation ({{ rep.turns }} turn{{ rep.turns|pluralize }})

{% for m in rep.conversation %}

{{ m.speaker }}{% if m.turn %} · turn {{ m.turn }}{% endif %}

{{ m.content }}

{% endfor %}
{% endif %} {% if rep.rationale %}

Judge rationale

{{ rep.rationale }}

{% endif %} {% include "partials/agentic_timeline.html" %} {% if rep.tokens or rep.other %}
{% if rep.tokens %}

Token usage ({{ rep.total_tokens }} total)

{% for t in rep.tokens %}

{{ t.role }}

{{ t.input|default:"0" }} in · {{ t.output|default:"0" }} out

{% endfor %}
{% endif %} {% if rep.other %}
{% for key, value in rep.other.items %}
{{ key }}{{ value }}
{% endfor %}
{% endif %}
{% endif %} {% if rep.images %}

Attached image{{ rep.images|length|pluralize }}

{% for uri in rep.images %}
attached image
{{ uri }}
{% endfor %}
{% endif %} {% include "partials/agentic_raw.html" %}