{% 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.derived_from_conversation %} No trace (derived from conversation){% if tc.span_count is not None %} · {{ tc.span_count }} turn{{ tc.span_count|pluralize }}{% endif %} {% elif 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.id }}

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

{% if f.reason %}

{{ f.reason }}

{% 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 %} {{ sp.label|default:sp.span_id }} {% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% for check in rep.agentic.checks %}
{{ check.status }}{{ check.id }} — {{ check.summary }} {% if check.expected or check.observed %}
Expected: {{ check.expected|default:'—' }} · Observed: {{ check.observed|default:'—' }}
{% endif %} {% if check.evidence_span_ids %}
Evidence spans: {% for span_id in check.evidence_span_ids %}{{ span_id }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endif %}
{% endfor %} {% 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 %}

{% 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 %} {% if rep.trace %}

Target trace

{{ rep.trace.spans|length }} span{{ rep.trace.spans|length|pluralize }} exported under {{ rep.trace.trace_ids|length }} trace{{ rep.trace.trace_ids|length|pluralize }} click to expand
{% if rep.trace.spans %} {% if rep.trace.trace_ids %}
{% for tid in rep.trace.trace_ids %} {{ tid|slice:":12" }}… {% endfor %}
{% endif %}
    {% for s in rep.trace.spans %}
  • {{ s.kind }} {{ s.name }} {% if s.attributes.tool_name %}· {{ s.attributes.tool_name }}{% endif %} {% if s.offset_ms is not None %}+{{ s.offset_ms }} ms{% endif %} {% if s.dur_ms > 0 %}{{ s.dur_ms }} ms{% endif %} {% if s.content_blocks or s.attributes %}
    {% for label, value in s.content_blocks %}

    {{ label }}

    {{ value }}
    {% endfor %}
    All attributes ({{ s.attributes|length }})
    {{ s.attributes|jsonify }}
    {% endif %}
  • {% endfor %}
{% if rep.trace.hidden_spans %}

+ {{ rep.trace.hidden_spans }} more span{{ rep.trace.hidden_spans|pluralize }} (shorter / beyond preview).

{% endif %}

Click a span for its tool arguments / results and raw attributes. Evidence links from the checks above jump to their spans.

{% else %}

The target exported no spans under this rep's trace{{ rep.trace.trace_ids|length|default:0|pluralize }} (tracing was on; the target's OTel may not be wired for this deployment).

{% endif %}
{% 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" %}