Search this library
Runs the query twice — once without the re-ranker, once with — so you can see what the re-ranker changed.
{% if search_error %}
{{ search_error }}
{% endif %}
{% if results_baseline and results_reranked %}
Query mode
{% if search_used_image %}
image + text
{% else %}
text
{% endif %}
Baseline time
{{ results_baseline.search_time_ms|floatformat:0 }}ms
Re-ranked time
{{ results_reranked.search_time_ms|floatformat:0 }}ms
Re-ranker
{% if results_reranked.reranker_used %}
{{ results_reranked.reranker_model|default:"on" }}
{% else %}
{% comment %}
The A/B page always requests rerank=True, so a
negative here is always a skip with a reason —
surface the reason in a tooltip so the user
knows *why* the B side fell back to fusion order.
Django's ``{# #}`` comment is single-line only;
multi-line blocks must use ``{% comment %}``.
{% endcomment %}
unavailable
{% endif %}
{% if not results_reranked.reranker_used and results_reranked.reranker_skip_reason %}
{{ results_reranked.reranker_skip_reason }}
{% endif %}
Without re-ranker (fusion order)
{% if results_baseline.candidates %}
{% for candidate in results_baseline.candidates %}
{{ candidate.score|floatformat:4 }}
{{ candidate.source }}
{% endfor %}
{% else %}
No results.
{% endif %}
With re-ranker
{% if results_reranked.candidates %}
{% for candidate in results_reranked.candidates %}
#{{ forloop.counter }}
{% if candidate.rank_delta_kind == "new" %}
new
{% elif candidate.rank_delta_kind == "up" %}
{{ candidate.rank_delta_label }}
{% elif candidate.rank_delta_kind == "down" %}
{{ candidate.rank_delta_label }}
{% else %}
=
{% endif %}
{{ candidate.item_title }}
chunk #{{ candidate.chunk_index }}
{{ candidate.text_preview }}
{{ candidate.score|floatformat:4 }}
{{ candidate.source }}
{% endfor %}
{% else %}
No results.
{% endif %}
{% if results_reranked.images %}
Image results
{% for image in results_reranked.images %}
{{ image.image_type }}
{{ image.description }}
{% endfor %}
{% endif %}
{% endif %}