ns-ui

Retrieval Chunk Sieve

RAG retrieval as a literal sieve — one hard rule across the frame with the chunks that cleared the similarity cutoff resting solid above it and the rejects falling as faint stubs below, and a connector rail that separates what was merely retrieved from what the answer actually used.

Use when the question is which retrieved chunks cleared the similarity cutoff and which of those the answer actually cited — the cutoff is a live control and 'retrieved but never used' has to be visible as a gap. citation-grounding-gap and citation-grounding-hatch are the better pick when the subject is the generated PROSE and which sentences of it are supported; confidence-logprob-hatch when the signal is per-token model confidence rather than per-chunk retrieval score; meter-threshold-trip when there is a single scalar crossing a limit and no corpus to rank.

Install

npx shadcn add https://design.helpmarq.com/r/retrieval-chunk-sieve.json
View source and playground

ns-ui / retrieval-chunk-sieve

What actually reached the answer

Twelve chunks retrieved for “why was I charged twice after upgrading?”. Six cleared the cutoff and rest on the rule. Only the three wired to the rail were cited.

Drag the rule to move the cutoff, or focus it and use the arrow keys.

Props

PropTypeDefaultDescription
chunksSieveChunk[]Retrieved chunks. Rank on screen is derived from score, not array order.
cutoff?numberControlled similarity cutoff, 0…1.
defaultCutoff?numberInitial cutoff when uncontrolled. @default 0.5
onCutoffChange?(cutoff: number) => voidFires on release / keypress with the value snapped to 3 decimals.
height?numberFrame height in px — the sieve's geometry is absolute, not fluid. @default 440
label?stringAccessible name for the cutoff slider. @default "Similarity cutoff"
className?string