{% extends "base.html" %} {% set page_title = "Insights" %} {% block title %}Insights | Suvra{% endblock %} {% block content %} {% raw %} {% endraw %}

Insights

Quality, patterns, and cost — everything the audit stream compounds into, in one place.

Simulate action
{# ══════════════════════ Band 1: Quality ══════════════════════ #}

Quality

Decision breakdown, pass/deny rate, and drift vs. the prior window.

{% if drift.level == 'red' %}⚠{% elif drift.level == 'green' %}✓{% else %}○{% endif %}
Quality Drift: {{ drift.label }} — denial rate {{ drift.recent_rate }} (last 3 days) vs {{ drift.prior_rate }} (prior 4 days) · {{ drift.delta }}

Total Actions

{{ evals_summary.total }}

{{ evals_summary.passing }} allowed

Pass Rate

{{ evals_summary.pass_rate }}%

{% if drift.level == 'green' %} improving {% elif drift.level == 'red' %} degrading {% else %} {{ drift.label }} {% endif %}

Blocked Actions

{{ evals_summary.failing }}

{{ evals_summary.failing }} denied {{ evals_summary.flaky }} need approval

8-Day Decision Trend

Allowed
Denied
Needs Approval
{% for day in trend_data %}
{% if day.total > 0 %}
{% else %}
{% endif %}
{{ day.total }} {{ day.date[5:] }}
{% endfor %}
{# ══════════════════════ Band 2: Patterns ══════════════════════ #}

Patterns

Top agents by blocks, top blocked action types, and recent lessons captured from denials.

{% if top_failing_agents %}

Agents Requiring Attention

{% for agent, count in top_failing_agents %} {% endfor %}
Agent Blocked Actions Risk Level
{{ agent }}
{{ count }} {% if count > 5 %} High {% elif count > 1 %} Medium {% else %} Low {% endif %}

Unattributed actions come from hooks or wrappers without an agent id — pass agent_id in your integration to attribute them.

{% endif %} {% if top_action_patterns %}

Action Patterns

which actions get blocked most
    {% for action, count in top_action_patterns %}
  • {{ action }} {{ count }}
  • {% endfor %}
{% endif %}
{% if total_lessons == 0 %}

No lessons captured yet

When Suvra blocks or flags an agent action, the reasoning appears here as institutional knowledge.

Simulate an action
{% else %}

Lesson Feed

recent signals captured from agent interactions
{% for lesson in lessons[:20] %}
{{ lesson.lesson_type }} {{ lesson.agent }} {{ lesson.relative_time }}

{{ lesson.takeaway }}

{% if lesson.action_json %}
Action details
{{ lesson.action_json }}
{% endif %}
{% endfor %}
{% endif %}
{# ══════════════════════ Band 3: Cost & distribution ══════════════════════ #}

Cost & distribution

Action-type distribution and cost-to-outcome figures.

Total Events

{{ analytics_summary.total_events }}

{{ analytics_summary.unique_agents }} unique agents

Pass Rate

{{ analytics_summary.pass_rate }}%

Deny Rate

{{ analytics_summary.deny_rate }}%

Cost to outcome

{{ "%.2f"|format(analytics_summary.token_capital_index) }}

Compounding rate: {{ "%.2f"|format(analytics_summary.compounding_rate) }}

Breakdown

Retrieval Accuracy
{{ "%.0f"|format(analytics_summary.retrieval_accuracy * 100) }}%
Eval Signal Quality
{{ "%.0f"|format(analytics_summary.eval_signal_quality * 100) }}%
Model Portability
{{ "%.0f"|format(analytics_summary.model_portability_score * 100) }}%
Human Correction Rate
{{ "%.0f"|format(analytics_summary.human_correction_rate * 100) }}%
{% if top_actions %}

Action Distribution

{% for action, count in top_actions %} {% endfor %}
Action TypeCount
{{ action }} {{ count }}
{% endif %}
{% endblock %}