{% extends "themis/base.html" %} {% block title %}{{ library.name }} — {{ themis_app_name }}{% endblock %} {% block content %}
← Libraries

{{ library.name }}

{{ library.library_type }}
{% if library.workspace_id %}
Daedalus workspace
{% endif %}
{% if library.description %}

{{ library.description }}

{% endif %}
Edit {% if library.workspace_id %} {% else %} Delete {% endif %}
{% if library.workspace_id %}
Managed by Daedalus
This library was created for Daedalus workspace {{ library.workspace_id }}. Items here are owned by the workspace; deleting the workspace in Daedalus will remove this library. Do not delete it manually.
{% endif %}
Content-Type Configuration
{% if library.embedding_instruction %}

Embedding Instruction

{{ library.embedding_instruction }}

{% endif %} {% if library.reranker_instruction %}

Reranker Instruction

{{ library.reranker_instruction }}

{% endif %} {% if library.llm_context_prompt %}

LLM Context Prompt

{{ library.llm_context_prompt }}

{% endif %}

Search this library

Runs the query twice — once without the re-ranker, once with — so you can see what the re-ranker changed.

{% csrf_token %}
{% if multimodal_available %}
{% else %}
Multimodal embeddings not configured — image search disabled.
{% endif %}
{% 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 %}
#{{ forloop.counter }}
{{ candidate.item_title }} chunk #{{ candidate.chunk_index }}

{{ candidate.text_preview }}

{{ 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 }}

{{ image.item_title|truncatechars:30 }} {{ image.score|floatformat:3 }}
{% endfor %}
{% endif %} {% endif %}

Collections

+ New Collection
{% if collections %}
{% for col in collections %} {% endfor %}
Name Description Actions
{{ col.name }} {{ col.description|truncatewords:15 }} View Edit
{% else %}

No collections in this library yet.

{% endif %} {% endblock %}