{% extends "_base.html" %} {% from "_partials.html" import avatar, status_pill, fresh_label, number %} {% set active = 'insights' %} {% block title %}trovex — insights{% endblock %} {% block topbar_meta %} {{ heatmap.total }} queries · last {{ days }}d {% endblock %} {% block content %}

Insights

query patterns, corpus blind spots, retrieval health
{% for d in [1, 7, 14, 30, 90] %} {{ d }}d {% endfor %}
{# ── Diagnostic KPI strip — form a mental model in 2 seconds ── #} {% set blind_pct = (failed | length / heatmap.total * 100) if heatmap.total > 0 else 0 %}
queries · {{ days }}d
{{ "{:,}".format(heatmap.total) }}
{% if top_q %}top: {{ top_q[0].q }}{% else %}no traffic yet{% endif %}
corpus blind spots
{{ failed | length }}
{% if failed %}{{ "%.0f"|format(blind_pct) }}% of queries · no good match{% else %}every query matched{% endif %}
repeated · unsatisfied
{{ repeated | length }}
{% if repeated %}same query asked ≥2× · retrieval gap{% else %}none — clean{% endif %}
cold docs
{{ dead | length }}
{% if dead %}never surfaced · cleanup candidates{% else %}all docs earning their keep{% endif %}
{# ── Top-level empty state — nothing has happened yet ─────── #} {% if heatmap.total == 0 and not dead %}
No query activity in the last {{ days }}d

Insights surface what your agents actually ask for — blind spots, stale docs, hot paths. Connect a coding agent over MCP and run a few queries, then come back.

Connect an agent {% for d in [30, 90] %}{% if d != days %} or widen the window to {{ d }}d → {% endif %}{% endfor %}
{% else %} {# ── Findings rail — prioritized, actionable triage ──────── #} {% if failed or repeated or dead %}
Needs attention prioritized by impact
{% if failed %} {{ failed | length }} blind spot{{ 's' if failed | length != 1 }} queries with no good match — the corpus is missing docs your agents need add docs → {% endif %} {% if repeated %} {{ repeated | length }} repeated quer{{ 'ies' if repeated | length != 1 else 'y' }} asked again and again — retrieval likely returned the wrong thing review ranking → {% endif %} {% if dead %} {{ dead | length }} cold doc{{ 's' if dead | length != 1 }} indexed but never surfaced in {{ days }}d — candidates for archival prune → {% endif %}
{% endif %} {# ── LLM rerank stats ─────────────────────────────────── #} {% if rerank.reranked_queries > 0 %}
LLM rerank · BYOK last {{ days }}d
RERANKED · LAST {{ days }}D
{{ "{:,}".format(rerank.reranked_queries) }} queries
{{ "%.0f"|format(rerank.coverage_pct) }}% coverage {% if rerank.total_queries - rerank.reranked_queries > 0 %} · {{ rerank.total_queries - rerank.reranked_queries }} vector-only fallback {% endif %}
total spend on caller keys
${{ "%.2f"|format(rerank.total_cost_usd) }}
avg ${{ "%.4f"|format(rerank.total_cost_usd / rerank.reranked_queries) }} / query
{# ── Divergence panel — does the LLM actually disagree? ── #} {% if divergence.total > 0 %}
DOES THE LLM EARN ITS TOKENS?
rerank changed top-1 on {{ "%.0f"|format(divergence.changed_pct) }}% of queries
{{ divergence.verdict }}
divergent
{{ divergence.changed }} / {{ divergence.total }}
avg lift
{{ "+%.1f"|format(divergence.avg_lift) }} positions
top-5 overlap
{{ "%.1f"|format(divergence.avg_top5_overlap) }}/5
{# Lift distribution histogram: where did the LLM pick its top-1 from? #} {% set max_lift = (divergence.lift_distribution | max) or 1 %}
where post-rerank top-1 came from in the vector ranking
{% for v in divergence.lift_distribution %}
{% endfor %}
pos 0 pos 19
vector top-1 confirmed LLM promoted lower result
{% if divergence.top_disagreements %}
Top disagreements — queries where LLM bypassed the vector top-1 the hardest
    {% for d in divergence.top_disagreements %}
  • +{{ d.top1_lift }}
    {{ d.user }} {{ d.query }}
    vector top-1 was: {{ d.pre_top1_path }}
  • {% endfor %}
{% endif %}
{% endif %} {% if rerank.by_model %}
{% set total_calls = rerank.by_model | sum(attribute='queries') or 1 %} {% for m in rerank.by_model %} {% set share = (m.queries / total_calls * 100) %}
{{ m.model }} {% if loop.index == 1 %} default {% endif %}
{{ m.queries }} calls · {{ m.avg_ms }}ms · {{ "{:,}".format(m.tokens_in) }}in · {{ "{:,}".format(m.tokens_out) }}out ${{ "%.3f"|format(m.cost_usd) }}
{% endfor %}
{% endif %}
{% endif %} {# ── Heatmap ──────────────────────────────────────────── #} {% if heatmap.total > 0 %}
When trovex is used UTC · 7d × 24h
less more
{% endif %} {# ── Top queries + Repeated ───────────────────────────── #}

Top queries

by volume
{% if top_q %}
    {% for q in top_q %}
  1. {{ loop.index }} {{ q.q }} {{ q.n }}× {% if q.users > 1 %}· {{ q.users }} users{% endif %}
  2. {% endfor %}
{% else %}
no queries yet
{% endif %}

Repeated queries

retrieval might be off
{% if repeated %}
    {% for r in repeated %}
  1. {{ avatar(r.user, 20) }} {{ r.q }} {{ r.times }}× {{ r.span_label }}
  2. {% endfor %}
{% else %}
none — clean
{% endif %}
{# ── Failed queries (corpus blind spots) ──────────────── #} {% if failed %}
Corpus blind spots no good match (score < 0.30)
{% endif %} {# ── Hot docs (most returned) ─────────────────────────── #} {% if most_returned %}
Hot docs most frequently returned
{% for p in most_returned %} {% endfor %}
path appearances top-1 share as top-1 avg score
{{ p.path }} {{ p.appearances }} {{ p.top1 }} {{ "%.0f"|format(p.top1 / p.appearances * 100) }}% {{ "%.3f"|format(p.avg_score) }}
{% endif %} {# ── Dead docs (cleanup candidates) ───────────────────── #} {% if dead %}
Cold docs never surfaced in last {{ days }}d · cleanup candidates
{% for d in dead %} {% endfor %}
path title status tokens age
{{ d.path }} {{ d.title }} {{ status_pill(d.status) }} {{ "{:,}".format(d.tokens_est) }} {{ fresh_label(d.age_days) }}
{% endif %} {% endif %}{# /not empty #} {% endblock %} {% block head %} {% endblock %}