Trust & transparency
Context sources
Use when the agent answers from your own documents and data, and users need to see exactly which passages it pulled.
Retrieved knowledge chunks with their sources.
Part of Trust & transparency. The stage where the answer has arrived and the user decides whether to believe it. These patterns show how the agent got there, what it read, and how sure it is. They matter most once people start acting on what the agent says.
Do
- Show the passage itself, with the file it came from and its type.
- Give the total number of chunks retrieved, even when you only show the top few.
- Title each chunk by what it says, not by its file name.
Don't
- Don't show similarity scores to people who are not tuning retrieval.
- Don't list every chunk. Show the ones that shaped the answer.
- Don't paraphrase the passage. Quote the source as it is written.
States
- Listed: A "Retrieved context" caption with the chunk count, then a card per chunk: title, length, the passage, and a file tag with its type.
- Hovered: The card under the pointer lifts slightly to show it is the one in focus.
Usage
import { ContextSourcesPattern } from "./halaska-kit";
<ContextSourcesPattern />
Built from
Related patterns
Halaska UI · Components · Patterns · Screens · Install