{% extends 'eval/base.html' %} {% load static %} {% block title %}Run Detail | Eval Admin{% endblock %} {% block action_bar %} {% endblock %} {% block content %}
{# ── Tab bar ── #}
{% for tab_id, tab_label in tab_list %}
{{ tab_label }}
{% endfor %}
{# ════════════════════════════════════════════════════════ #} {# TAB 1 — Criteria Scores + Q/A #} {# ════════════════════════════════════════════════════════ #}

User Query

{{ user_input|default:"—" }}

LLM Response

{{ final_response|default:"—" }}
{% if run_breakdown.criteria_scores %} {% for s in run_breakdown.criteria_scores %}
{{ s.key }} {{ s.score }}/{{ s.max_score }}

{{ s.explanation }}

{% endfor %} {% else %}

No criteria scores available.

{% endif %}
{# ════════════════════════════════════════════════════════ #} {# TAB 2 — Trace Context #} {# ════════════════════════════════════════════════════════ #}

{{ trace_context.total_spans }} observations · total {{ trace_context.max_latency }}

{% if trace_context.tree %}
{# ── Left: observation table ── #}
Node Duration Latency
{% for node in trace_context.tree %}
{% if node.depth > 0 %}{% if node.is_last_child %}└{% else %}├{% endif %}{% endif %} {{ node.badge_label }} {{ node.name }} {% if node.cost %}{{ node.cost }}{% endif %} {% if node.tool_annotation %}→ {{ node.tool_annotation }}{% endif %}
{% if node.bar_pct > 0 %}
{% endif %}
{% if node.latency %}{{ node.latency }}{% endif %}
{% endfor %}
{# ── Right: detail viewer ── #}
{# Header #}
{# Metric cards #}
{# Tool Calls #} {# Output #} {# Empty state #}
{% else %}

No observations recorded.

{% endif %}
{# ════════════════════════════════════════════════════════ #} {# TAB 3 — Metrics #} {# ════════════════════════════════════════════════════════ #}

Cost: {{ run_breakdown.cost }} · Tokens: {{ run_breakdown.total_tokens }} · Latency: {{ run_breakdown.latency }}

Cost

{% include "eval/components/_metric_static.html" with metric_label="Total Cost" metric_value=run_breakdown.cost metric_target=run_breakdown.target_cost metric_delta=run_breakdown.delta_cost %} {% include "eval/components/_metric_static.html" with metric_label="Input Token Cost" metric_value=run_breakdown.cost_input metric_target=run_breakdown.target_cost_input metric_delta=run_breakdown.delta_cost_input %} {% include "eval/components/_metric_static.html" with metric_label="Output Token Cost" metric_value=run_breakdown.cost_output metric_target=run_breakdown.target_cost_output metric_delta=run_breakdown.delta_cost_output %}

Tokens

{% include "eval/components/_metric_static.html" with metric_label="Input Tokens" metric_value=run_breakdown.input_tokens metric_target=run_breakdown.target_tokens metric_delta=run_breakdown.delta_input_tok %} {% include "eval/components/_metric_static.html" with metric_label="Output Tokens" metric_value=run_breakdown.output_tokens metric_target=run_breakdown.target_output_tokens metric_delta=run_breakdown.delta_output_tok %} {% include "eval/components/_metric_static.html" with metric_label="Total Tokens" metric_value=run_breakdown.total_tokens metric_target=run_breakdown.target_total_tokens metric_delta=run_breakdown.delta_total_tok %}

Latency

{% include "eval/components/_metric_static.html" with metric_label="Total Latency" metric_value=run_breakdown.latency metric_target=run_breakdown.target_latency metric_delta=run_breakdown.delta_latency %} {% include "eval/components/_metric_static.html" with metric_label="Agent Latency" metric_value=run_breakdown.agent_latency metric_target=run_breakdown.target_agent_latency metric_delta=run_breakdown.delta_agent_latency %} {% include "eval/components/_metric_static.html" with metric_label="Tool Latency" metric_value=run_breakdown.tool_latency metric_target=run_breakdown.target_tool_latency metric_delta=run_breakdown.delta_tool_latency %}
{% if run_breakdown.threshold_total %}

{% if run_breakdown.threshold_all_pass %}All metrics within threshold ✓{% else %}{{ run_breakdown.threshold_failing }} metric{{ run_breakdown.threshold_failing|pluralize }} exceeding threshold ✗{% endif %}

{{ run_breakdown.threshold_passing }}/{{ run_breakdown.threshold_total }} passing

{% endif %}
{% endblock %}