RAG
RetrievalResults
List of retrieved chunks with in-set search and a score-threshold slider.
Preview
Retrieved chunks
query: When does the fiscal year end and how are quarterly reports submitted?
- 0.9400.23
- 0.8600.18
- 0.5800.04
- 0.3100.11
Installation
pnpm add nyxis-ui
Usage
import { RetrievalResults, type RetrievedChunk } from 'nyxis-ui';
<RetrievalResults
chunks={chunks}
query="When does the fiscal year end?"
defaultThreshold={0.5}
onSelect={(id) => focus(id)}
/>;
Anatomy
- Header: query (rendered in mono) + filtered/total count.
- Search input filters by source, locator, and chunk text.
- Threshold slider hides anything below the chosen score (uses
rerankScorewhen present, elsescore). - Stack of
<ChunkCard>rows; selection is forwarded to each.