Shared component for rendering retrieved chunks across the Advanced, Pipeline, and Loop sub-tabs of the Ask dashboard.
Features
- Groups chunks by document with a compact header per document.
- Shows document titles when available (falls back to a shortened UUID).
- Click-to-expand details for each chunk, revealing the full text.
- When
:groundingis supplied, centers the snippet around the text the grounder cited from this chunk (instead of the first N chars). - Highlights chunks that the grounder used as a source.
- Score rendered as
score: 0.0246.
Usage
<ChunkResultsComponent.chunk_results
prefix={@prefix}
chunks={@ask_context.results}
document_titles={@ask_context.document_titles || %{}}
grounding={Map.get(@ask_context, :grounding)}
id="ask-chunks"
/>
Summary
Functions
Attributes
prefix(:string) (required) - Dashboard mount prefix used to build document links.chunks(:list) (required) - List of chunk maps with id/text/score/document_id/chunk_index.document_titles(:map) - Map of document_id to display title. Defaults to%{}.grounding(:any) - Optional %Arcana.Grounding.Result{}. Defaults tonil.id(:string) - Defaults to"chunk-results".