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
chunks={@ask_context.results}
document_titles={@ask_context.document_titles || %{}}
grounding={Map.get(@ask_context, :grounding)}
id="ask-chunks"
/>