{# _partials/score_decomposition.html — Bundle B's "Why this paper?" panel extracted into a reusable partial (Bundle H). Required context: paper — dict with keys: score_breakdown_json TEXT (JSON object, e.g. '{"semantic": 0.8, ...}') score REAL The caller is responsible for guarding with: {% if show_score_decomp|default(true) and paper.score_breakdown_json %} #} {% set breakdown = paper.score_breakdown_json | fromjson %}
Why this paper? {% for signal, score in breakdown.items() %} {% endfor %}
SignalScore
{{ signal }}{{ "%.3f" | format(score | float) }}
total {{ "%.3f" | format(paper.score or 0 | float) }}