optimize debug retrieval
This commit is contained in:
@@ -21,19 +21,16 @@
|
||||
|
||||
<div class="card bg-black border-secondary text-light mb-4">
|
||||
<div class="card-body small">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<strong>Max Chunks:</strong>
|
||||
{{ config.retrievalMaxChunks }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<strong>Vector Top K:</strong>
|
||||
{{ config.retrievalVectorTopK }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,38 +74,95 @@
|
||||
</h5>
|
||||
|
||||
<div style="max-height: 500px; overflow-y: auto;">
|
||||
|
||||
{% for chunk in results %}
|
||||
<div class="border border-secondary p-3 mb-3 small">
|
||||
|
||||
{# ================= META-ZEILE ================= #}
|
||||
<div class="mb-2 text-warning" style="font-size: 11px; line-height: 1.4;">
|
||||
<span class="text-info"><strong>rank:</strong> {{ chunk.rank }}</span> |
|
||||
<span class="text-info"><strong>chunk_id:</strong> {{ chunk.chunk_id }}</span> |
|
||||
<span class="text-info"><strong>document_id:</strong> <a
|
||||
class="text-info"
|
||||
href="{{ path('admin_document_show', { id: chunk.document_id }) }}">
|
||||
{{ chunk.document_id }}
|
||||
</a></span> |
|
||||
<span><strong>rrf_score:</strong> {{ chunk.rrf_score|number_format(6, '.', '') }}</span>
|
||||
|
|
||||
<span><strong>raw_score:</strong> {{ chunk.raw_score|number_format(6, '.', '') }}</span>
|
||||
|
|
||||
<div class="mb-2 text-warning"
|
||||
style="font-size: 11px; line-height: 1.5; word-break: break-all;">
|
||||
|
||||
<span class="text-info">
|
||||
<strong>rank:</strong> {{ chunk.rank }}
|
||||
</span> |
|
||||
|
||||
<span class="text-info">
|
||||
<strong>chunk_id:</strong> {{ chunk.chunk_id }}
|
||||
</span> |
|
||||
|
||||
<span class="text-info">
|
||||
<strong>document_id:</strong>
|
||||
{% if chunk.document_id %}
|
||||
<a class="text-info"
|
||||
href="{{ path('admin_document_show', { id: chunk.document_id }) }}">
|
||||
{{ chunk.document_id }}
|
||||
</a>
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</span> |
|
||||
|
||||
<span><strong>threshold:</strong> {{ chunk.threshold }}</span> |
|
||||
<span><strong>intent:</strong> {{ chunk.intent }}</span> |
|
||||
<span>
|
||||
<strong>is_list_query:</strong>
|
||||
{{ chunk.is_list_query ? 'true' : 'false' }}
|
||||
</span>
|
||||
<strong>route:</strong>
|
||||
<span class="
|
||||
{% if chunk.route == 'catalog_list' %}
|
||||
text-primary
|
||||
{% elseif chunk.route starts with 'catalog' %}
|
||||
text-info
|
||||
{% elseif chunk.route starts with 'sales' %}
|
||||
text-success
|
||||
{% else %}
|
||||
text-secondary
|
||||
{% endif %}
|
||||
">
|
||||
{{ chunk.route ?? '—' }}
|
||||
</span>
|
||||
</span> |
|
||||
|
||||
<span>
|
||||
<strong>entity:</strong>
|
||||
{{ chunk.entity_label ?? '—' }}
|
||||
</span> |
|
||||
|
||||
<span>
|
||||
<strong>intent:</strong>
|
||||
{{ chunk.intent ?? '—' }}
|
||||
</span> |
|
||||
|
||||
<span>
|
||||
<strong>rrf:</strong>
|
||||
{{ chunk.rrf_score is not null
|
||||
? chunk.rrf_score|number_format(6, '.', '')
|
||||
: '—' }}
|
||||
</span> |
|
||||
|
||||
<span>
|
||||
<strong>raw:</strong>
|
||||
{{ chunk.raw_score is not null
|
||||
? chunk.raw_score|number_format(6, '.', '')
|
||||
: '—' }}
|
||||
</span> |
|
||||
|
||||
<span>
|
||||
<strong>threshold:</strong>
|
||||
{{ chunk.threshold ?? '—' }}
|
||||
</span> |
|
||||
|
||||
<span>
|
||||
<strong>list:</strong>
|
||||
{{ chunk.is_list_query ? 'true' : 'false' }}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
{# ================= CHUNK TEXT ================= #}
|
||||
<div>
|
||||
<div class="text-light">
|
||||
{{ chunk.text }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user