N
Nyxis
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?

4 / 4
  1. 0.9400.23
  2. 0.8600.18
  3. 0.5800.04
  4. 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 rerankScore when present, else score).
  • Stack of <ChunkCard> rows; selection is forwarded to each.